Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Insert into a table

Status
Not open for further replies.

pabby

IS-IT--Management
Jan 5, 2004
47
GB
HI

I have an asp.net page that has some checkboxes and some text boxes and a submit button. The users simply fill out the boxes and hit the submit button, then a single sql table is filled where the text/check boxes have corresponding columns in the table.

I am a beginner so my coding knowledge is not so good. Under the submit button I have the following:

Dim sqlconn As SqlClient.SqlConnection

sqlconn = New SqlClient.SqlConnection
sqlconn.ConnectionString = "Integrated Security=True;Data Source = GTSQL;Initial Catalog=TestDbase;"
Dim Ad As SqlDataAdapter = New SqlDataAdapter

- what do I do next to actually take the the contents of the text boxes and stick it into the table ?

thanks,

Paul
 
You need to look at some examples in help or on the web. There are many ways to do this, you just have to decide what is best for what you are doing.
Basically you have to decide if you want to call a stored procedure or create the Insert statemtent in code. If you are using a stored procedure you need to append parameters as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top