Results 1 to 2 of 2

Thread: textbox text to access database

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    1

    textbox text to access database

    Hello everyone,
    this is my problem: I need the code to be able to send info from a textbox to an access database. I understand I have to use Ado but I cant put the code together. so lets say my textboxes are called textbox1 & textbox2
    my database is located and called c:\htw.mdb, my table is called table1 and the 2 columns are named test1 & test2.
    I want to be able to send the data to access when clicking on a button
    can anyone provide me the code please.

    Thanks in advance

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: textbox text to access database

    First up, you won't be using ADO. You'll be using ADO.NET, which is different. There are various links in my signature that can provide ADO.NET resources: Database FAQ, Walkthroughs and Videos.

    As for getting the data to the database, the TextBox is essentially irrelevant. The Text property of a TextBox is a String, just like any other String. If you know how to insert a string into a database, which you will after reading those links, then you know how to insert the Text from a TextBox into a database.

    If you have any more specific questions after reading then feel free to post.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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