Jump to content

ASP -- > Store procedure SQL 2005

Recommended Posts

Hello,At bottom you can see the code of SQL procedure that inserts the value to a table1. And the test asp page which has a form with where the value is insertet and submited. The problem is that i don t know how to send the value to an executed procedure , that is wrong and that is the reason why i get an error that the parameter for procedure is not provided. I know that i need to provide the Web value from a form at the time that the procedure is executed. Can you help me with this problem. The procedure in SQL works but when a button is submited the error ...Thanks,KASP test page

<form name = "test" action = "test.asp?sub=add" method = "POST"><input type = "text" name = "ValueWEB"><input type = "submit" name ="insert" value = "enter"></form><%ValueWEB = RequestForm("ValueWEB")set cnn = server.createobject("ADODB.Connection")cnn.open "PROVIDER = SQLOLEDB; DATA SOURCE = TESTSERVER; UID = sa; PWD = test123; DATABASE =db"If ValueWEB <> "" thencnn.testprocedureend if%>

testprocedure in SQL SERVER 2005

USE dbGOCREATE PROCEDURE testprocedure(   @ValueWEB varchar(30))ASINSERT INTO ValueTable(  Value)VALUES(  @ValueWEB)

Link to post
Share on other sites

I don't use classic ASP, nor do I use ADO connections, but it appears to me that you are attempting to execute an unknown method on the connection object:


Looking at http://www.w3schools.com/ado/met_conn_execute.asp, you'll probably want to do something like this:


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...