By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

Textbox = SQL column

OuTCasT
100+
P: 374
Is it possible to assign a textbox to a column of an sql database at runtime ????

i have labels next to textboxes, there labels are bound at runtime so i want the corresponding textboxes to be assigned the same name so that the data in text boxes are assigned to the correct data columns ?
Apr 9 '08 #1
Share this Question
Share on Google+
2 Replies


jeffstl
Expert 100+
P: 432
Is it possible to assign a textbox to a column of an sql database at runtime ????

i have labels next to textboxes, there labels are bound at runtime so i want the corresponding textboxes to be assigned the same name so that the data in text boxes are assigned to the correct data columns ?
Yes.

Either by binding the text box control to a VB data control on your form (Datasource property).

Or by setting the txtBox.Text equal to a variable populated by an Recordset.
Expand|Select|Wrap|Line Numbers
  1. MyVar = MyRecordSet("ColumnName")
  2. txtBox.Text = MyVar
  3.  
If you have problems or errors attempting to implement this post the code and problems here and I can take a look
Apr 9 '08 #2

OuTCasT
100+
P: 374
Yes.

Either by binding the text box control to a VB data control on your form (Datasource property).

Or by setting the txtBox.Text equal to a variable populated by an Recordset.
Expand|Select|Wrap|Line Numbers
  1. MyVar = MyRecordSet("ColumnName")
  2. txtBox.Text = MyVar
  3.  
If you have problems or errors attempting to implement this post the code and problems here and I can take a look
Thanks for the reply.... i will try it today and get back to u

DK
Apr 10 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.