borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (max statement in vb.net) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : intelligent people help me
Poster Message
kalboako1987
Level: Trainee

Registered: 14-11-2007
Posts: 3

icon intelligent people help me

hello guys

Im trying to autopopulate my form from a table in my database called Enrollment.it will fill the textboxes in my form whenever the id number typed in the textbox is existing in my database.. the selection will be based in the highest EnrollmentID whatever is the highest EnrollmentID that matches with id number will automatically fill the textboxes. i put these code inside my idnumber textbox by double clicking it. can somebody help me please...


i need all the advice that you can give me..



Private Sub populate()
        Dim xx As DataTable


        xx = db1.doQuery("select idno from Enrollment where idno='" + Me.txtidno.Text + "'")
        If xx.Rows.Count <> 0 Then
          
            xx = db1.doQuery("select Firstname, Middlename, Lastname, level1, preschoollevel,primarylevel,secondarylevel,tuitionfee, amountpaid,tobwithd,tobwithoutd from Enrollment where Firstname='" + Me.txtfirstname.Text + "', Middlename='" + Me.txtmi.Text + "', Lastname='" + Me.txtlastname.Text + "', level1 = '" + Me.ComboBox1.Text + "', preschoollevel='" + Me.cmbpreschool.Text + "', primarylevel='" + Me.cmbprimary.Text + "', secondarylevel ='" + Me.cmbsecondary.Text + "', tuitionfee='" + Me.TextBox5.Text + "', amountpaid ='" + Me.txtpreviousamountpaid.Text + "', tobwithd= '" + Me.txtbal.Text + "', tobwithoutd = '" + Me.txtbal.Text + "'")

14-11-2007 at 10:22 PM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 901
icon Re: intelligent people help me

Hi Kalboako1987
I advise that you read the FAQ or at least attempt to research this on the MSDN/Google.
Can you clarify what you wish "populate" to do?
It looks like you are expecting the user to fill in all of the details on the form before you run the populate routine. I suggest you read on up "data access" in .net
Regards
Kieron
Incidentally, I went to "www.google.com", and in the textbox at the top, I typed "ado vb net" and found the following:
http://visualbasic.about.com/od/learnvbnetandadonet/l/aa041203a.htm
Hope it helps


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

17-11-2007 at 11:10 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : intelligent people help me
Next Topic (max statement in vb.net) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder