booboo0912
Programmer
I'm pulling my hair out with this one! I'm trying to learn from examples on how to pass parameters to a stored procedure. My first problem is not knowing much about VB & stored procedures! I have the following code...
<%
Dim strFName, strLName
strFName = Request.Form("FirstName"
strLName = Request.Form("LastName"
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly = 1
adLockReadOnly = 1
adCmdTable = 3
Dim conn, cmd
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open = "Provider=SQLOLEDB.1;Persist....etc
Set cmd = Server.CreateObject("ADODB.Command"
cmd.CommandText = "addName"
cmd.ActiveConnection = conn
cmd.CommandType = &H0004
cmd.Parameters.Append cmd.CreateParameters("txtFN", adVarChar, adParamInput, , strFName)
cmd.Parameters.Append cmd.CreateParameters("txtLN", adVarChar, adParamInput, , strLName)
cmd.Execute
cmd.Close()
Set cmd = nothing
%>
I assume there's something wrong with the above code and not my stored procedure???? Does anyone see anything I'm missing?
Thanks in advance!!!!!
<%
Dim strFName, strLName
strFName = Request.Form("FirstName"
strLName = Request.Form("LastName"
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly = 1
adLockReadOnly = 1
adCmdTable = 3
Dim conn, cmd
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open = "Provider=SQLOLEDB.1;Persist....etc
Set cmd = Server.CreateObject("ADODB.Command"
cmd.CommandText = "addName"
cmd.ActiveConnection = conn
cmd.CommandType = &H0004
cmd.Parameters.Append cmd.CreateParameters("txtFN", adVarChar, adParamInput, , strFName)
cmd.Parameters.Append cmd.CreateParameters("txtLN", adVarChar, adParamInput, , strLName)
cmd.Execute
cmd.Close()
Set cmd = nothing
%>
I assume there's something wrong with the above code and not my stored procedure???? Does anyone see anything I'm missing?
Thanks in advance!!!!!