Ask a Question related to ASP Database, Design and Development.
-
sean #1
recordset not returning value from SQL server
HI There,
I am having a little trouble displaying a recordset from SQL Server and I
was wondering if someone could have a look at my code to see what I have
missing?
I can execute the stored procedure successfully in the query analizer, I
just can't get the records to show on the page.
Sean - thanks in advance
!-- stored procedure
CREATE PROCEDURE GetLargeImages
@productID int
AS
SELECT image1Large, image2Large FROM
tblProducts WHERE productID=@productID
GO
!-- code
Set adoRec = Server.CreateObject("ADODB.Recordset")
Set adoCmd = Server.CreateObject("ADODB.Command")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open dbConnectionStr
adoCmd.ActiveConnection = objConn
adoCmd.CommandType = adCmdStoredProc
adoCmd.CommandText = "GetLargeImages"
Set PID = adoCmd.CreateParameter("productID", adInteger, adParamInput,4)
adoCmd.Parameters.Append PID
Set adoRec = adoCmd.Execute
response.write adoRec("image1Large")
response.End
sean Guest
-
Recordset returning inconsistent results
I am developing a php site using mysql and apache. I have finally managed to get a database connection and am trying now to create some... -
Help - stored procedure not returning a recordset
I have an ASP page that calls a SQL Server stored proc that should return multiple recordsets, but it appears to be returning something else, or it... -
Returning ADO recordset over the internet from ASP
Hi, I remember seeing (a long time ago) an ADO code snippet that would query a local database (Access) and return the result as an ADO recordset... -
Vb6 object returning ADO Recordset - Error in .NET
Hi, My C#, ASP.NET application uses com-interop to call a vb6 method which returns a ADO 2.6 recordset. I can successfully call the COM... -
Help with Stored Procedure returning recordset
Hi, Try to add set nocount on in the beginning of procedure. "Scott McDaniel" <junk@junk.com> wrote in message... -
Aaron [SQL Server MVP] #2
Re: recordset not returning value from SQL server
What is the data type of image1Large? What string is in dbConnectionStr?
How about:
Set conn = CreateObject("ADODB.Connection")
conn.Open dbConnectionStr
set rs = conn.execute("EXEC GetLargeImages")
response.write rs(0)
rs.close: set rs = nothing
conn.close: set conn = nothing
Aaron [SQL Server MVP] Guest



Reply With Quote

