Calling A Stored Proc

I would like to call my stored proc and invoke the WITH RECOMPILE option. I can't figure out what to set in ADO to make that happen. how to make this work? BTW, I _don't_ want to create the stored proc using the WITH RECOMPILE.

View Replies


ADVERTISEMENT

Stored Proc

I need to also add an AND after the where like

WHERE (Id = @CId)
and MAX(end) < NOW()

CREATE PROCEDURE dbo.[sp_rsgroup]
@Id int
AS

SELECT ISNULL(Group, '') AS GroupCalc, MIN(start) AS START, COUNT(Id) AS Count
FROM Table
WHERE (Id = @CId)
GROUP BY ISNULL(Group, '')
ORDER BY start
GO

View Replies View Related

Stored Proc

What is the simplest way to open up a stored query in Access - I'v got this far but I need to open: qry_Listings.

set cnn = Server.CreateObject("ADODB.Connection")
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("../database/listings.mdb") '//This one is for Access
2000/2002
cnn.Open strCon

View Replies View Related

Array From Stored Proc

as I'm in the process of performance tuning, I'm trying to receive a NUMBER type array from a Stored Procedure.I made a VARRAY OF NUMBER in my stored procedure. I'm not able to receive this in a Function in ASP.

View Replies View Related

Open Dynaset From Stored Proc

I need to open a Recordset with a dynamic cursor from a Stored Proc. Does anyone have the syntax?

View Replies View Related

AdDate Parameter To Stored Proc.

I am trying to pass a VBScript Date variable as value to an ADO adDate
parameter of a stored procedure (which runs in an SQL Server).
If I add the parameter like this:

oCmd.Parameters.Append oCmd.CreateParameter( "@p_Date", adDate,
adParamInput, , dParam)

where oCmd is of type ADODB.Command and dParam is a VBScript variable of
type Date
then when trying to execute the stored procedure I get the following error:

Optional feature not implemented

I was able to get round this by passing a string value in an adVarChar
parameter, but it would be easier and more readable with adDate and
Date-type variables. Is this latter possible?

View Replies View Related

How To Call A Stored Proc Asynchronously

Is it possible to call a stored procedure asynchronously from an ASP page?
We would like to be able to execute a proc and have the page continue to
process without having to wait for the proc to finish. I know you can make
a dll and call it from there, but we'd rather just be able to keep it simple
and call it from the page if we can.

View Replies View Related

XML STRING Passed To Stored Proc

I am using SQL SERVER 2005 and ASP.

Would anyone be kind enough to give me a solution to the problem below please?

If for example in the stored procedure looks like this:

-- Initialize the SQL Server XML stored procedures
EXEC sp_xml_preparedocument @xmlDoc OUTPUT, @xmlString

Insert into @TableBook
SELECT * FROM OPENXML (@xmlDoc, 'books/book') WITH
(
bookNameVARCHAR(100) 'name',
authorVARCHAR(100) 'author'
)

The question is supposing there is a node called 'Surname' but I am not adding 'Surname' to 'Author'. If I want to check 'Surname' value DOES exists and I want to replace it with 'Author' or if 'Surname' does not exist, just use 'Author' node instead.

I am not sure how you can use IF statement to check a node and put the value into SET @surname and then put something like author VARCHAR(100) '@surname' OR author VARCHAR(100) '@Author'. Just like switching it around.

View Replies View Related

Post Param From Asp To Sql Stored Proc

I am trying to run the following t-sql stored proc from my VBScript page

Create Procedure getUserInfo
(
@login nvarchar(8)
)
AS
USE proj_dashboard
SELECT f_forename, f_surname, f_profile_id
FROM t_users
WHERE f_login = @login

basically I wasnt to pull in the login of the user pass it to the proc and pull out the info for that user. I use the following sql statement Code:

View Replies View Related

Resultset Returned By Stored Proc

I've got a problem with an ASP page which calls a stored proc. The sybase stored procedure returns numeric values as shown: ...

View Replies View Related

Records Returned From Stored Proc

I've created a Stored Procedure which adds a new record and updates some more records and then returns the primary key for the added record.

The SP seems to work OK, but I'm having problems getting at the returned key in my ASP code:

"Item cannot be found in the collection corresponding to the requested name or ordinal."

A common error, but in this case I can't see why... I output the SQL instruction that is sent to the DB and have run it in Query Analyser and it runs OK and returns a single row, with a single column - the new primary key...

But when I try and access this in ASP, I get the error message....

View Replies View Related

Executing SQL Stored Proc And Returning XML Through ADO In ASP Page ??

I need to return XML from a SQL Stored Procedure which I will execute through ASP ADO code. Stored Procedure as below:

CREATE PROCEDURE pr_GetJobInfo2
@JobType int,
@CntryID int,
@JobTitle varchar(8000) OUTPUT
AS
SELECT @JobTitle = ltrim(rtrim(JobTitle))
FROM dbo.JOBS
WHERE JobType = @JobType
AND CntryID = @CntryID
FOR XML AUTO
[code]

Now the output parameter (@JobTitle) cannot be assigned to FOR XML, so what must I do ??? My ASP code reads as: ....

View Replies View Related

ASP, ORACLE STORED PROC Must Return A Recordset

Does anyone know how ASP calls a stored procedure in ORACLE ? I want the stored procedure to return a recordset bact to the ASP environment.

Can a stored procedure in ORACLE return a recordset to ASP. If so can you direct me to the necessary syntax that can be useful for this ?

View Replies View Related

ASP Button To Execute Stored Proc In Table Adapter

Is it possible to add a stored proc to a table adapter and execute the proc
inside an ASP button click event?

I have a table adapter called Claimers and a sp called AddWatch. On the
onclick event I would like to call the table adapter and execute the sp.
Note that the sp does not return records. Code:

View Replies View Related

Calling A Stored Procedure

I am new to asp, basically new to everything. but I am trying to create a log table and and trouble calling my stored procedure from my asp page, see code:

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'sp_logsession'
/app/lib.asp, line 71

i am using the following code to execute it in my asp page:

SET objConn = Server.CreateObject("ADODB.Connection")
objConn.Open Application("deConn")

Execute sp_logsession(browser,timenow,remoteaddress,idsess ion,refer)

is there anyone who could help me to get this working?

View Replies View Related

SQL Stored Procedures, Calling In ASP

I am trying to send some emails that are stored in a SQL database to a variable within my ASP page. Once the emails have been gathered and stored in the variable (as a string of emails) I want to send an email to those emails using that variable.

I'm trying to accomplish this by using a stored procedure.

Here is how my SP is set up in sql enterprise manager:

Code: ....

View Replies View Related

Calling Stored Procedures In ASP

I am trying to use a stored procedure created in SQL Server 2005 and execute it in ASP. How can I return the entire recordset from the stored procedure the way I can do it with a recordset?

set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = Conn

' Specify the name of the stored procedure you wish to call
cmd.CommandText = "sp_Org_Structure"

'Form variable to pass as a paramter to the SP
strUI = 4655

sql = "EXECUTE sp_Org_Structure " & strUI
response.write sql

Secondly, instead of hard-coding the name of the SP in the sql statement, how I call the 'cmd.CommandText' from within this SQL Statement.

View Replies View Related

Calling Stored Procedure

i am getting an error when i try to call a SP in ASP script. The code is as follows..

set conn = Server.CreateObject("ADODB.Connection")
Set cmd = Server.CreateObject("ADODB.Command")
conn.Open "DSN=Test;UID=sa;PWD=nmsglobal;"
Set cmd.ActiveConnection = conn
cmd.CommandText = "sp_test"
cmd.CommandType = adCmdStoredProc

It gives me an error for the last line saying tht adCmdStoredProc= empty. if nebody knows the solution.

View Replies View Related

Calling Multiple Stored Procedures

I have two stored procedures:

1. LoadFile - Loads data from a file to a table...which can take up to 10 minutes if the file is large enough. While loading, it periodically updates a record in a "load summary" table with the total number of records to load, the number of records currently loaded and the status of the load.
2. GetLoadSummary - Gets the record from the "load summary" table.
My hope was that in ASP, I could call LoadFile within one FRAME and then on a timer within another FRAME call GetLoadSummary to create a progress bar for the user.My problem is that when I call LoadFile, I can't seem to execute any other stored procedures until it finishes.

View Replies View Related

Calling Stored Procedure From An ASP Page

I have a stored procedure named as

usp_CheckLogin with two parameters

as @usID, @Password

also values of these parameters are to be extracted using Request.Form from
the fields in the forms. Now How do I call this stored procedure from an ASP
Page using a Connection object in Server Tags <% %>. Also this stored
procedure returns a Numeric value as "RETURN_VALUE". please give me the
syntax. This stored Procedure is a part of Session Management module.

View Replies View Related

Error While Calling Stored Procedure From Asp Page

I am trying to run an example code from a book. However I am getting the following error message:

Number: -2147217900
Description: Syntax error or access violation

Source: Microsoft OLE DB Provider for SQL Server

SQLState: 42000

NativeError: 0

The following is the code that is being used in the asp page:....

View Replies View Related

Calling Vb Exe

I have got a vb exe. I want to call that vb exe from an asp page. I have saved it in the server but I dont know how to execute that from the asp page.

View Replies View Related

Calling A Dll

I am running a project in which i use a web application writen in ASP to create some quizes, then i would like to call a compilor (dll) to compile the data i created and change it to .mms file in order to be able to send it to mobile device.

Can you please guide me on how to call the dll file from my ASP application?

View Replies View Related

Calling DLL

I have created an Active Server Component (ASC) as a bridge between ASP and my existing C++ DLLs that we use in our PC-based program. Our intent is to re-use as much code as possible.

when I call the ASC from ASP, and then call the DLL, the security profile that is specified in IIS is no longer associated with the process, and therefore, any "network-related" calls fail due to insufficient privileges.

I don't know if there is "another" way to call the DLL from the ASC or not, or any way tospecifically load a DLL with a certain security profile.

View Replies View Related

Calling Exe In Asp

i am calling an exe from asp program. Its not working fine. When i execute the exe through the dos program directly i get the desired result. My exe will convert files in the folder to encrypted files.

But when i call it thru asp program its not working fine. I have tried the
following method.

a) Calling the exe through shell program.
b) Calling the exe through ASPEXEC.
c) Calling the exe through the Batch Files.

I would like to know your suggestions.

View Replies View Related

Calling Sub

Here's a problem I can't solve.
Let n sub procedures A1, ... An

sub A1()
end sub
....
sub An()
end sub
....

I want to call indirectly one of them with a variable name like
this :

Ex :
myProc="A5"
Call myProc()
....

This doesn't work. Is there a way to solve this problem ?

View Replies View Related

Calling A Sub

i've got two pages. they have the same name for two sub procedures that do pretty much the same thing and have the same number and types of arguments. i either run one page, the other page or both. when i run page1 it somehow is accessing page2 even if it isn't called with an include statement.

page 1 is using the sub with the same name from another page even if it isn't included. so what's going on? is that normal? should i just make one page instead of 2? didn't think that sub's could jump accross pages that weren't included, but i could be wrong.

View Replies View Related

Calling Functions...

Where's the best place for me to include all my functions that I want to call throughout different pages? Should I just put them all in one ASP file and include that page on every page? Or use global.asa somehow (how??)?

Anyways, I was just wondering because I didn't want to slow things down if I could help it (I didn't know if having another big file attached to every page when I'm just using a small portion of it was very effective or not)

View Replies View Related

TypeMismatch Calling Sub

in my serverside vbscript I have:

call MySub();
......
......

then in the <Head>section I have:

sub MySub()
msgbox("Holding not found")
end sub

when I run it I get a typemismatch against the serverside call.

Anybody any ideas?

View Replies View Related

Calling SQL Script From ASP

I want to create tables in my database programatically. I know i can do it using adodb connection object. I have too many tables, views and stored procedures. If I have to write a code, I will have to write 1000 lines of code. I dont think, thats the best way to do it.

I already have a sql script for these tables, views and stored procedures. I want to know if i can execute that sql script directly from ASP.

I will explain the background, to give a better understanding of my situation. We have a website, which uses the existing database to generate reports. If we want to host that website (as a service) to third parties, we create a new database for every customer, create all the necessary tables, views and stored procedures in the new database. I want to make all the table creation programmatic. Is it possible?

View Replies View Related

Calling JScript

I'm working on a project and the designer guy uses templates for everything. THis is fine except I have to call a JScript function when the page loads and I have no access to the body tag. Is there a way to call the function as the page loads from a VBScript command?

View Replies View Related

Calling Function From Asp

I have the following problem. I want to call a JavaScript Function from ASP
I am reading back values from a db and based on those values I want to check a checkbox.
If the value in the db field in yes then I want to check the checkbox but if it's no I want to leave the
checkbox unchecked.
My alert box is displaying but Im getting an error at the line
document.getElementById("chkStatus").checked = "true";

View Replies View Related

Calling External Sub

Im wanting to call a sub funvtion on another page from vbs that is:

<SCRIPT LANGUAGE=vbscript RUNAT=Server>
sql="exec SomeStoredProc"
call DoConnection(sql)
Response.write(recordset.getstring)
call DBClose()
</SCRIPT>

the DoConnection sub is in another page called MyDBConnection in a folder call Common.

I know that I can use serverside includes and embed my con in the page using <%%> but I want the use runat server How can I make call to a function in an external page?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved