Question How to add datasource in the textbox vb2008

fadedkeil

Member
Joined
Feb 8, 2009
Messages
12
Programming Experience
Beginner
I already connected the database with tables in my solution how can i connect it to the textbox so i can input new data and use it,
Untitled-2.jpg

and put it in this textboxes so i can login properly >_<.
Untitled2.jpg
Help please I am using vs 2008 visual basic and ms access 2007 for db Thank you for your future replies.
 
You can do it in the designer under (DataBindings) or manually through code.

VB.NET:
TextBox1.DataBindings.Add("Text", DataSetName.Tables("TableName"), "Column")

or

VB.NET:
TextBox1.DataBindings.Add("Text, DataSetName, "TableName.ColumnName")
 
thx

thx vry much and btw if i use that certain column as my password or id what command should i use after i binded that certain textbox with the column on my db. how to use that entity as password and also same with the ID field I seem cant Dim the entry and use if statements but its all wrong =)
 
Last edited:
Show your Data Sources window (like Server Explorer, but different)

Now, in that window, find the column you want on your form as a text box, and drag it there. The bindings are set up for you automatically
 

Latest posts

Back
Top