|
-
October 3rd, 2000, 11:45 AM
#1
ASP - SQL - Server Cursor Error
We are running ASP connecting to an SQL server 7 database.
We are getting the following error message from the web server when a stored procedure is called.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]A server cursor is not allowed on a stored procedure with more than one SELECT statement. Use a default result set or client cursor.
/updown/main_menu.asp, line 113
Any ideas/help would be appreciated ?
The stored procedure is as follows.
Alter Procedure sp_upload_services (@TPLocationCode varchar(35))
As
SELECT OrigID, RecipID, FTATR.MessageType, EANCode, TPName, DisplayText, URLLocation
FROM dbo.FTATR,dbo.TProfile,dbo.WEBPages
WHERE TProfile.EANCode = FTATR.RecipID
AND FTATR.OrigID = @TPLocationCode
AND FTATR.MessageType = WEBPages.MessageType
return (0)
The ASP file contains the following details.
Dim cmdOCProfiles
Dim rsUploadPages
'Define a command object for sp_get_ocprofiles stored procedure.
Set cmdOCProfiles = server.CreateObject("ADODB.Command")
Set cmdOCProfiles.ActiveConnection = Conn
cmdOCProfiles.CommandText = "sp_upload_services"
cmdOCProfiles.CommandType = adCmdStoredProc
cmdOCProfiles.CommandTimeout = 0
'UserName parameter
Set prmTPLocationCode = server.CreateObject("ADODB.Parameter")
prmTPLocationCode.Type = adVarChar
prmTPLocationCode.Size = 35
prmTPLocationCode.Direction = adParamInput
prmTPLocationCode.Value = Session("USER")
cmdOCProfiles.Parameters.Append prmTPLocationCode
'Create recordset by executing the command.
Set rsUploadPages = server.CreateObject("ADODB.Recordset")
rsUploadPages.Open cmdOCProfiles
rsUploadPages.MoveFirst
'-----------------------------------------------------------------
'---------------CALL STORED PROCEDURE FOR DOWNLOADS----------------
' SEND TRADING PARTNERS EANCODE TO
' DATABASE AND RETRIEVE TRADING
' RELATIONSHIP DETAILS FOR DROP DOWN MENUS
Dim cmdDownloads
Dim rsDownPages
'Define a command object for sp_get_ocprofiles stored procedure.
Set cmdDownloads = server.CreateObject("ADODB.Command")
Set cmdDownloads.ActiveConnection = Conn
cmdDownloads.CommandText = "sp_download_services"
cmdDownloads.CommandType = adCmdStoredProc
cmdDownloads.CommandTimeout = 0
'UserName parameter
Set prmLocationCode = server.CreateObject("ADODB.Parameter")
prmLocationCode.Type = adVarChar
prmLocationCode.Size = 35
prmLocationCode.Direction = adParamInput
prmLocationCode.Value = Session("USER") '
cmdDownloads.Parameters.Append prmLocationCode
'Create recordset by executing the command.
Set rsDownPages = server.CreateObject("ADODB.Recordset")
rsDownPages.Open cmdDownloads
rsDownPages.MoveFirst ********************** line 113
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
|