469,312 Members | 2,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

ASP/ Stored Procedure Query

Hi!

I'm not sure if you can do this but what I want to do it execute a
stored procedure but query it with dynamic ASP data. Basically,

exex StoredProc where id = 2

I am using a set of dynamic data and I truly belive looping trought the
dataset would be too much overhead on the server.

Any ideas?

Thanks,
Andrew J Durstewitz

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
Jul 19 '05 #1
4 1384
What does your SP look like? Doesn't it allow you to pass an argument to
it?

create proc YourStoredProc @theID int AS...

Ray at work

"Andrew J Durstewitz" <ad*********@moreheadassociates.com> wrote in message
news:3f*********************@news.frii.net...
Hi!

I'm not sure if you can do this but what I want to do it execute a
stored procedure but query it with dynamic ASP data. Basically,

exex StoredProc where id = 2

I am using a set of dynamic data and I truly belive looping trought the
dataset would be too much overhead on the server.

Any ideas?

Thanks,
Andrew J Durstewitz

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.

Jul 19 '05 #2
The problem with that is I'm using a dynamic where statement. Basically
I have a loop like so...

Do While Not blah.Eof
sqlStatment = " or id=" & blah("id")
blah.MoveNext
Loop

Otherwise I could use that idea, unless there is something I am missing
about getting dynamic information into SQL.

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
Jul 19 '05 #3
I don't understand. You already have your recordset in the code you posted
below. You aren't doing anything with the ID at that point other than
concatenating some strings.

create theStoredProc @theArg int as
select whatever from wherever where id=@theArg
<%
theID = [your source for the ID]
Set rs = yourADOConnection.Execute("exec theStoredProc " & theID)
'...
%>

Ray at work

"Andrew J Durstewitz" <ad*********@moreheadassociates.com> wrote in message
news:3f*********************@news.frii.net...
The problem with that is I'm using a dynamic where statement. Basically
I have a loop like so...

Do While Not blah.Eof
sqlStatment = " or id=" & blah("id")
blah.MoveNext
Loop

Otherwise I could use that idea, unless there is something I am missing
about getting dynamic information into SQL.

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.

Jul 19 '05 #4
Ok, I actually figured it out.

Thanks,
Andrew J Durstewitz

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Douglas Buchanan | last post: by
10 posts views Thread by Thomas R. Hummel | last post: by
2 posts views Thread by Dino L. | last post: by
7 posts views Thread by eholz1 | last post: by
4 posts views Thread by aCe | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.