Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2003, 09:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default Stored Proc and Access

Hi all.

I can't get my stored procedure working. Let me show your:

what I want to work
intContentID = Request.Form("ContentID")
strContentPage = Request.Form("ContentPage")
strSQL = "qryVerifyContent (" & CLng(intContentID) & ", '" & CStr(strContentPage) & "')"
Set objRSVerify = objConn.Execute(strSQL)

what does work
intContentID = Request.Form("ContentID")
strContentPage = Request.Form("ContentPage")
strSQL = "SELECT Content.ContentText " & _
         "FROM Content " & _
     "WHERE (((Content.ContentID)=" & intContentID & ") AND ((Content.ContentPage) Like '" & strContentPage & "'));"
Set objRSVerify = objConn.Execute(strSQL)

But I keep getting an error...
My storedProc is this:
PARAMETERS intContentID Long, strContentPage Text ( 255 );
SELECT Content.ContentText
FROM Content
WHERE (((Content.ContentID)=[intContentID]) AND ((Content.ContentPage) Like [strContentPage]));
I think it's something with the parameters...

All help is appreciated - Jon

Regards - Jon
__________________
- mega
Aspiring JavaScript Ninja
 
Old June 11th, 2003, 07:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

And what is the error?


Hal Levy
Daddyshome, LLC
 
Old June 14th, 2003, 06:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Stupid me forgot that you can't query a sproc with the connection object. I used the Recordset object and it worked out fine.
Do you know if there is any performance advantage if I used the Command object instead? I'm just retrieving a single value to compare in VBScript. I might compare directly in the SQL. Hmm.. I will not be doing it that often, maybe it's not worth it...

Regards - Jon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
MS Access .mdb calling SQL server 2000 stored proc fazzou Access 6 September 8th, 2006 11:32 AM
How to get value from stored proc busybee ASP.NET 1.0 and 1.1 Basics 4 April 2nd, 2006 01:06 AM
How i can OUTPUT in Stored Proc yoord SQL Server 2000 2 July 19th, 2004 03:11 PM
Simplify the stored proc stephanel SQL Server 2000 3 August 5th, 2003 08:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.