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
ADVERTISEMENT
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
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
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
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
View Related
I need to open a Recordset with a dynamic cursor from a Stored Proc. Does anyone have the syntax?
View Replies
View Related
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
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
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
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
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
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
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
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
I would like to know if anyone knows how to execute a stored procedure from ASP.NET 2.0. I'm using the NorthWind database and I'm trying to execute the "CustOrderHist" stored procedure. The error I get is "Incorrect syntax near 'CustOrderHist'. "
Public Function GetCustomerOrderHistory(ByVal customerid As String) As
SqlDataReader
Dim conn As New SqlConnection(conString)
Dim cmd As New SqlCommand("CustOrderHist", conn)
cmd.Parameters.AddWithValue("@CustomerID", customerid)
conn.Open()
Dim dtr As SqlDataReader =
cmd.ExecuteReader(CommandBehavior.CloseConnection)
Return dtr
End Function
View Replies
View Related
How do I call a Stored Procedure with ASP?
View Replies
View Related
Is this the correct way to read a variable from a stored procedure
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "sp_Supplier"
Hi i'd like to know what this line in a asp page does ?
cmd.Parameters.Append cmd.CreateParameter("Supplier",adVarChar,adParamInput,10,sChangeSupplier)
View Replies
View Related
I have a Stored Procedure (SP) being called by my ASP page, but nothing is being executed. The SQL Profiler shows a RPC execute, but the actual SP is not executing as nothing is being inserted.
If I run an EXEC in Query Analyzer, with the same data being passed, it works fine and returns my OUTPUT. The SQL Profiler shows all the hits to the database then too. Code:
View Replies
View Related
I'm trying to call a stored procedure(package) from asp/vb using following
code but I got the error message. What's the correct syntax for oracle stored procedured? Code:
View Replies
View Related
I'm trying to call a stored procedure(package) from ASP/VB using following code. But I got the error message. Code:
View Replies
View Related
I want to write a dll using VB6/VC6 and used by ASP. Questions are:
1. what special requirements for the dll used by ASP?
2. after built dll, how to use it in ASP? Where I should
save the dll? Do I need to register the dll?
Any article/link related to my question? the sample code?
View Replies
View Related
How to call VC++ DLL from ASP? Could any1 show me the way/coding step by step?
View Replies
View Related
I want to have a single script for sending emails, accessible from both
ASP pages in any virtual directory in our websites (all on the one
server), plus accessible from a number of WSH (windows scripting host
vbscript files) which are triggered by the web servers Scheduled tasks.
The script formats text and checks emails and so on.
Is this a candidate for a web service? if so, how would i write it? Is a
web service available from WSH?
View Replies
View Related
We have a C++ DLL that we call from VB6 program. This is how we declare the DLL in VB6:
Declare Function RefSearch Lib "csearch32.dll" (ByVal path As String, ByVal findword As String, ByVal CaseSensitive As Integer) As Integer This is how we call the DLL in VB6:
hit = RefSearch(path, SearchStr1, ChkValue). Can I call this DLL in ASP and how ?
View Replies
View Related
I have two .asp pages running under different IIS authentication methods..
The first page uses Windows Authentication and gets the Logged on User from
Request.ServerVariables("User_Logon")
The second page runs under different Domain credentials and can access the
ldap directory... so I want to call it like so..
user = request.servervariables("User_Logon")
then something like --
<%
call page2.asp?theuser=" & user"
%>
where page2 runs as 'anonymous' credentials... (and Logon_User is Null)
-------
If this can't be done can I write the information to a cookie and then read
it from the other asp? How would I do that?
View Replies
View Related
I just want to call two exe files from asp code.
View Replies
View Related
Does anyone try before using ASP to execute JOB in MSSQL?
View Replies
View Related
I have a bummer here. I have 3 sub R. that I need to call from a input button. I set up the following line, but the script just calls them with out having the button pressed. OOOO! Any ideas?
<form method="submit" name="nreg" onsubmit="(this)" action="call readitme, call saveitme, call reduce" >
I have also used method="POST" same darn thing, script just runs the sub R. with out being pushed or cliked. UUUGGG
View Replies
View Related
I have a form which checks email addresses. On submitting the form i have some JavaScript checking the format of the email address, once this has been completed successfully I would like my asp function to run. On successful completion of that I would like my form to be submitted to another page. Is this possible?
View Replies
View Related
This may be in the wrong forum, but I'm going to give it a shot anyways. Here goes.
I have a conference report that has 24 phone lines that are available for booking. Each call can take between 1-24 lines, you can have any number of calls as long as the number of lines they take up does not go over 24.
I graphiclly represent this in a horizontal bar graph that displays the number of lines that are taken up for a particular half hour.
Problem is when a meeting takes more than a half an hour, the meeting bar fills up for that whole time without any information on the meeting.
What I would like to do is have each meeting when assigned in the DB or through an array be assigned a color and then that color appears on the graph under the time the meeting is. If there are multiple meetings (there almost always are), then the meeting that has been active the longest will be the first color bar on the graph.
To make a way too long story short. I want to have a stacked bar chart that moves colors to the front as other's leave every half hour and move new ones to the back.
If you want to look at what we have now visit URL.
View Replies
View Related
Ok i'm self taught with regards to ASP so not great etc, so sorry if this is a really basic question..
On the last line here i'm trying to some how get it to call the last ID entry...
ImageID = Request("ID")
If (Len(ImageID) = 0) then ImageID = "1"
If Not IsNumeric(ImageID) Then ImageID = "1"
If ImageID = "0" then ImageID = "1"
If ImageID>3 then ImageID = max(Len(ImageID))
This is basically for some max min links for a online comic here's what it links to
<a href="default.asp?id=<%=ImageID-1%>">< Backwards</a> -
<a href="default.asp?id=<%=ImageID+1%>">Forward ></a> -
Code:
View Replies
View Related
Can i call function from dll from an asp page (not COM)?
The problem is that i want the asp page to call function from dll which will
be in the same folder.
I could have created a com dll but it means that the web hosting company
must register it on their server and they wont.
View Replies
View Related
My 1st page calls a 2nd that uses same data from a database. What is
the best way to get the data in the second: a new call to the database
or passing array through session variable??
I seems to me that avoiding a new call will speed up things but my
concerne is that I have read many posts with caution messages againts
session vars.
View Replies
View Related