Hi i am trying to insert new records by using a stored procedure with the following code:
In get the following error:PHP Code:<%
Dim Connection
Dim Command
Dim Records
Dim Count
Dim CurrentService
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open Application("conn")
Set Command = Server.CreateObject("ADODB.Command")
Set Command.ActiveConnection = Connection
Command.CommandType = adCmdStoredProc 'Call the stored procedure here
Select Case Request("Action")
Case "Create"
Command.CommandText = "spTaxiBookingCreate" 'Call the type of stored procedure here
Command.Parameters.Append Command.CreateParameter("@theDate", adDate, adParamInput) 'Append Parameters
Command.Parameters.Append Command.CreateParameter("@theTime", adDate, adParamInput)
Command.Parameters.Append Command.CreateParameter("@Location", adVarWChar, adParamInput, 50)
Command.Parameters.Append Command.CreateParameter("@DropOff", adVarWChar, adParamInput, 50)
Command.Parameters.Append Command.CreateParameter("@Paid", adInteger, adParamInput)
Command.Parameters.Append Command.CreateParameter("@Notes", adVarWChar, adParamInput, 3600)
Command.Parameters("@theDate") = Request("theDate")
Command.Parameters("@theTime") = Request("theTime")
Command.Parameters("@Location") = Left(Request("Location"), 50)
Command.Parameters("@DropOff") = Left(Request("DropOff"), 50)
Command.Parameters("@Paid") = CInt(Request("Paid"))
Command.Parameters("@Notes") = Left(Request("Notes"), 3600)
Command.Execute
Command.Parameters.Delete 1 'theDate --- Clear Parameters from memory
Command.Parameters.Delete 1 'theTime
Command.Parameters.Delete 1 'Location
Command.Parameters.Delete 1 'DropOff
Command.Parameters.Delete 1 'Paid
Command.Parameters.Delete 1 'Notes
End Select
Command.CommandText = "spTaxiBookings"
Set Records = Server.CreateObject("ADODB.Recordset")
Records.Open Command, , adOpenStatic
%>
Referring to this line:Microsoft SQL Native Client error '80040e14'
A server cursor cannot be opened on the given statement or statements. Use a default result set or client cursor.
Any ideas what the problem might be?PHP Code:Records.Open Command, , adOpenStatic
Thanks










Bookmarks