trouble inserting

MarioRammy

Member
Joined
Feb 1, 2008
Messages
12
Programming Experience
Beginner
Hey, I'm kinda new to this and this sounds a bit silly to some, but i'm having trouble inserting from my VB.net app to my DB!!

I have a textbox called "txtName" on "Main" form, and i want to insert this into a colume "Name" in my table "Details" in the database, which i have set up, called "MyDB"!

I'm not even sure where to start !

Any help would be great thanks,

Mario
 
Drop a SQL connection object on your form, configure it to connect you your DB

Then drop a SQL dataadapter on the form and configure it to grab the data from the tables you need (using your SQL connection object)

Then right click on the dataadapter and select 'Generate Dataset', now bind your textbox to the dataset, then in the form load event, fill your dataset by using the Fill() method on your dataadapter

Now all you need is buttons for moving forward, backward, new record, delete, etc... you can use the BindingManager to adjust the position

PS. Look @ Cjard's signature, he has links to pages that explains the "overview" I posted in more detail
 
Back
Top