473,463 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1540
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
5
by: Warren Wright | last post by:
Hi group, I have a select statement that if run against a 1 million record database directly in query analyzer takes less than 1 second. However, if I execute the select statement in a stored...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
7
by: Douglas Buchanan | last post by:
I can't seem to open SQLS2k Stored Procedures in the IDE I am running MDE 2003 Version 7.1.3088 I have a MSDN professional subscription and did a complete install of vs.net Help explains how...
10
by: Thomas R. Hummel | last post by:
I have a stored procedure that suddenly started performing horribly. The query plan didn't look right to me, so I copy/pasted the code and ran it (it's a single SELECT statement). That ran pretty...
1
by: Raquel | last post by:
Have a question on the Stored procedure method code generated by DB2 development center for Java stored procedures. Suppose I have a requirement to return the resultset consisting of FIRSTNME,...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
5
by: ric_deez | last post by:
Hi there, I would like to create a simple search form to allow users to search for a job number based on a number of parameters. I think I understand how to use parameteres associated with Stored...
7
by: eholz1 | last post by:
Hello PHP group, Could someone help me out? I have PHP 5.2, Apache 2.0, and MySQL 5.0 running on Linux (Redhat Fedora Core 6). All that works fine. I would like to be able to "call" a stored...
4
by: aCe | last post by:
hi all, i need to convert these simple PHP code into stored procedure : <?php $result = mssql_query( "SELECT whid, whcode FROM warehouse" ); while( $wh = mssql_fetch_object( $result ) ) {...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.