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
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.