Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling stored proc via ADO from ASP
Message
De
28/02/2001 00:26:24
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Calling stored proc via ADO from ASP
Divers
Thread ID:
00480407
Message ID:
00480407
Vues:
42
Hello everyone,

I am new to SQL Server & ASP so please allow me some slack if I get the terminology or acronyms wrong in places.

I am calling a parameterised stored procedure from an ASP page. The Stored procedure is returning the correct details in the recordset however the cursor type of the recordset is Forward-Only. Is there any way to get a Static cursor returned as we need to be able to navigate the recordset in reverse sequence in some circumstances?

The code being used is as follows:

Set test = Server.CreateObject("ADODB.Command")
lnRecsToReturn = 10
test.ActiveConnection = application("connstring")
test.CommandText = "Inv_Prod"
test.CommandType = adCmdStoredProc
test.Parameters.Append = test.CreateParameter("@SQLText",adVarWChar,adParamInput,len(vSQLText),vSQLText)
test.Parameters.Append = test.CreateParameter("@whse",adVarWChar,adParamInput,len(session("whse")),session("whse"))
test.Parameters.Append = test.CreateParameter("@StartPN",adVarWchar,adParamInput,len(lcStartPn),lcStartpN)
test.Parameters.Append = test.CreateParameter("@RecsToReturn",adInteger,adParamInput,,lnRecsToReturn)

Set VRS = Server.CreateObject("ADODB.Recordset")
VRS.Open test,,adOpenStatic, , adCmdStoredProc

The connection string to the SQL 7.0 server is as follows:
Application("ConnString") = "Provider=SQLOLEDB.1;User ID=sa;Password=testsa;Initial Catalog=Test;Data Source=TestBed"

TIA,

Andy
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform