Results 1 to 6 of 6

Thread: textbox data binding

  1. #1

    Thread Starter
    Addicted Member mepaco's Avatar
    Join Date
    Mar 2002
    Location
    Jackson, MS
    Posts
    185

    textbox data binding

    I'm sure this is a simple question but how do you bind textboxes to field in a database. I had a VB6 project in which I had some textboxes bound to an ADO data control. I 'upgraded' (ha) my project to VB.Net and now don't know how to bind them to the data control again, or even if I can. I just want them to display fields in an Access database and let the user navigate the records. Thanks.

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Click on the text box, on the properties box, go to dataBindings.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Addicted Member mepaco's Avatar
    Join Date
    Mar 2002
    Location
    Jackson, MS
    Posts
    185
    I have tried that. When I try and bind the text field nothing comes up. When I click on the dropdown menu under databindings the only thing that shows up is 'None'.

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    I think you can only do it programmaticcally using the binding manager and seeting the binding name of the control (your text box) to the data you want to bind it to, I had to do a similar thing only I was still using a datagrid and needed to create my own table style and use the datagridtextbox which inherits from text box, initially try searcging the help using the keywords currency manager and binding names and that will probably point you to where you want to go, also I am sure that one of the wakthroughs covers binding to a text box - good luck!

  5. #5
    Addicted Member ender_pete's Avatar
    Join Date
    Aug 2000
    Location
    Virginia, United States
    Posts
    131
    do you have a dataset in your project?

    to use the databinding properties in the form designer you need a dataset. If you just have the oledbdataadapter right click on it and there will be a menu option that says generate dataset.
    just follow the wizards steps then after the dataset is created go to the datbinding properties of the text box
    ender_pete
    C#,VS.NET Ent Arch, vb6 ee sp5,html,vbscript,jscript,
    xml,dhtml,delphi,c++,vc++,java,cgi,php, python, ada(so ancient) ,adasage(also ancient) and others i can't remember.....

  6. #6

    Thread Starter
    Addicted Member mepaco's Avatar
    Join Date
    Mar 2002
    Location
    Jackson, MS
    Posts
    185
    Thanks everybody. I am pretty familiar with VB6 but I just installed .Net yesterday and was getting frustrated. I will try your suggestions as soon as I get up and running ... I had to format and reinstall everything. Stupid virus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width