Click here to Skip to main content
15,311,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i am a beginner with visual basic and i need help as i have a deadline for monday for a university project.

i am making a tool where the user enters a name in a text box and the software automatically brings up the related information for that name from a database called database1.

if the database looks like the one below as an example:

name d.o.b address
user1 01/01/1987 10 1st street
user2 02/02/1988 11 2nd street

and i have 2 forms, form1 and form2.

how do i tell vb to get the d.o.b of the name entered in the text box txtname.text on form1 to a text box called txtdob.text on form2 from the database?

and how do i initially connect the database to my vb windows form?

p.s. i am using visual basic 2008 express edition

thank you in advance for any help much appreciated.
Posted
Updated 12-Aug-10 15:16pm
v3
Comments
[no name] 12-Aug-10 21:17pm
   
Removed URGENT as it is rude here. This site is voluntary and people will answer on their time, not yours.

You'll need to make use of the System.Data.SqlClient namespace. You'll need to have SQL Server 2008 installed (there is a free version). You'll need to know how to use a SQL SELECT statement. You'll make use of the SqlCommand and SqlConnection classes. You'll need to know how to build a connection string. You'll need to have a valid database user/password. You'll probably want to pass data between forms using either constructors or properties. Google some of those terms and you should have no problem coming up with a solution.
   
Well, if you willing to learn, go through these tutorials
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900