|
-
Apr 21st, 2004, 03:32 AM
#1
Thread Starter
New Member
INSERT stored procedure...
Hi guys!
Can u please help me how to conect the INSERT stored procedure to ASP web application.
I have a sample code here but it wont work. It wont add new rows to the database. Is there something wrong with this code?
SqlConnection1.Open()
SqlDataAdapter1.InsertCommand.Parameters(1).Value=TextBox1.Text
SqlDataAdapter1.InsertCommand.Parameters(2).Value = TextBox2.Text
SqlDataAdapter1.InsertCommand.Parameters(3).Value = TextBox3.Text
SqlDataAdapter1.InsertCommand.Parameters(4).Value = TextBox4.Text
SqlDataAdapter1.InsertCommand.Parameters(5).Value = TextBox5.Text
SqlDataAdapter1.InsertCommand.ExecuteNonQuery()
SqlConnection1.Close()
assuming that I have 5 parameters in stored procedure....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|