Help Inserting Into SQL Server

gearbolt

Member
Joined
Mar 16, 2003
Messages
14
I have a form that has three text boxes and one button . The user will fill in the three text boxes and then hit the button the Add the new info into the database. Here is the layout of the database.

pk_Account_Id_Number <-AutoNumber
char_Account_name <-User Will Supply
date_Account_Open_Date <-User Will Supply
int_Account_Balance <-User Will Supply

I cannot figure out how to get the info from the textbox and into the database using code only.

Thanks
 
Psuedo -

Declare Connection
Declare Command w/ Connection + Sql Statement
Open Connection
Do Command.ExecuteNonQuery()
Dispose Command
Close Connection

Connection = SqlConnection object.
Command = SqlCommand object.

Do a search in the object browser if youre unfamiliar with the objects. I believe someone also posted links of sample code on how to do this.. try doing a search on these forums.
 
Back
Top