Textbox = SQL column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OuTCasT
    Contributor
    • Jan 2008
    • 374

    Textbox = SQL column

    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 ?
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    Originally posted by OuTCasT
    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.
    [code=vb]
    MyVar = MyRecordSet("Co lumnName")
    txtBox.Text = MyVar
    [/code]

    If you have problems or errors attempting to implement this post the code and problems here and I can take a look

    Comment

    • OuTCasT
      Contributor
      • Jan 2008
      • 374

      #3
      Originally posted by jeffstl
      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.
      [code=vb]
      MyVar = MyRecordSet("Co lumnName")
      txtBox.Text = MyVar
      [/code]

      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

      Comment

      Working...