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


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

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 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

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

Use Of Varchar(max) - Stored Procedure Parameter

I need to use varchar(max) for my out parameter (@resultText) from the 4000 length it is currently using. When i change the length to -1 or drop it altogether i get an error, how can i fix this issue? Code:

View Replies View Related

Pass A Parameter In A Stored Access

I have a stored access query which is corresponding to a particular id. However, I am using a login script to capture the value of an id. Now, I want to dynamically open the stored query by passing the id captured via login.

Which means, I need to erase the static id value associated with the stored query GMISExpenseCombo. how do i open this stored query by passing the id value to the stored
query. I am using this stored query to retrieve some financial data for the corresponding record. Currently, I am opeing the static stored query as follows RS.Open "GMISExpenseCombo"

View Replies View Related

Passing Null Value As Parameter In Update Stored Procedure

I am attempting to pass null as the input value from a series of
textboxes if the user does not input a value prior to submit. To try and do
this, I am using a vbscript function on this asp as follows:

CommentsAdd = IIf(Request.Form("Comments")="",NULL,Request.Form("Comments"))

I was hoping this would convert those emptystring textboxes to null.

Then, these variables are input in an update stored procedure called from
the same asp upon submit. This handles ntext and like fields in the table I
am updating, but a null value passed in this way for a numeric field chokes.
The error on the asp is something like, "unable to convert value of type
text to numeric". Can't null be passed as a parameter value when the field
type is numeric?

How does one pass null for a parameter's value in a stored procedure on an
asp? Am I missing something here?

View Replies View Related

Passing Parameter From ASP Web Page To Stored Procedure In SQL Server

I'm trying to pass parameters from an ASP (VBScript) web page to a Stored Procedure in SQL Server. I know how to do the Stored procedure but it's passing the parameter from the web page that is stumping me.

View Replies View Related

ASP Parameter

How can i pass parameter in ASP with hide
ex : default.asp?id=9
i wanna be : default.asp but the id still follow the page

View Replies View Related

Get Parameter In Url

I would like to get parameter of ASP script in URL. example : /localhost/example.asp?parameter1 . How can i to get this parameter ?

View Replies View Related

Add Parameter

I am trying to pass three parameters using this code in an asp page to an
xsl page. I keep getting the following error:

Microsoft VBScript runtime error '800a01a8'
Object required: ''

/account.asp, line 114

Any ideas what I am missing? Code:

View Replies View Related

QueryString Parameter

A MS-Access database table has 2 columns - UserID (unique) of number data type & UserName (text) along with some other columns.When users come to a particular page, say, AllUsers.asp, all the UserNames are displayed to him as hyperlinks. Based on the UserName
clicked by a user, the next page (to which the user will be taken to when he clicks any of the UserNames) will display more information about that particular UserName (which the user had clicked).Assume that the page where more info is displayed is named UserInfo.asp.
(Note that the info will also be retrieved from the DB table).

UserInfo.asp will also display the UserName the user had just clciked in AllUsers.asp.
Now for UserInfo.asp to retrieve data about the UserName the user has just clicked, I can make the links in AllUsers.asp pass the UserID as well as the UserName as a querystring value. Now whcih one will be more efficient - sending the UserID as the querystrinng value or sending the UserName as the querystring value?

View Replies View Related

Userdocument With Parameter

I can call a user document with a paramer in the IE Address bar eg:
C:Program FilesMicrosoft Visual StudioVB98docMyDocument.vbd?Parameter

I can call the Userdocument using these lines of code in ASP:

Sub Window_OnLoad
Navigate "docMyDocument.VBD"
End Sub

I have beed trying to pass it a parameter with the following syntax :
Navigate "docMyDocument.VBD?Parameter"

This does not seem to work. How do I call the userdocument in ASP with a parameter ?

View Replies View Related

Pass Parameter

I am using Crystal v7. Main report and subreport are both based on the same stored procedure. How do I pass parameters to display the report and subreport in the Crystal viewer. I can display regular (non-sub) reports fine.

View Replies View Related

Returning Parameter

I got a problem returning parameter. I am storing date using datepicker to choose my date. But when i want to delete it from the table because date is one of the primary key. it has problem when i retrieved it because it is recognized as datetime but when it display it's a text. i need 2 convert from text to date. how would declare my parameter then?

View Replies View Related

Passing Parameter Value

I am using Ultradev to develop asp pages with Access database. With the help of some online friends & tutorials i am studying this. I need some help for the following. I am having 2 tables,

Table 1 with Company Name & Country Code
Table 2 with Country Code & Country Name.

When some one searches for a company, it should display me the Company Name along with the Country it belongs. Someone told me that it can be done by passing a parameter value from one recordset to another on the same page, but i dont know how to do this.

View Replies View Related

Parameter And Value Of Clients

myGetImage.asp is suppose to create a temporary file in the client side, and display in on the client web browser. myGetImage.asp needs to know the clients web browser temporary system path, in order to create the temp file. How do I get the parameter and value of clients web browser temporary system path?

View Replies View Related

Getting A CDONT Parameter

My website sends automatic emails from many (25) different places. I want to
send a second email by reading the parameters of the first one. I don't want
to have to repeat and maintain the assignment of the second email
From,To,Subject fields so I am just using an include at each point in the
code where I send an email: Code:

View Replies View Related

Passing Parameter To COM

If a com is being used at two diff places and it requires same number of inputs how can we pass inputs if number of inputs are not same on every page.

View Replies View Related

Checking For URL Parameter

Is it possible to do a quick check to see if you were refered to the page with URL parameters and if so perform an action?

View Replies View Related

Parameter Names

I 'd like to print out all posted parameter names and values. I'm able to print all the posted request values, but not the parameter names.

View Replies View Related

How To Pass Parameter To Script

I am trying to pass some paramters from a VBScript function to a script that writes the parameters to a text file. I have not been able to do it. Code:

View Replies View Related

ADO Parameter Of The Wrong Type

I've taken over the development of a web app written in ASP. It's not
very well coded. In the live environment it's fine, but on my local
machine it falls over whenever it tries to pass a date to a SQL Server
sproc. No idea why the person before me's been doing all this string
formatting with his dates, but anyway, the error is:

Application uses a value of the wrong type for the current operation.

The dates throughout are in mmddyyyy format, and presumably ADO
running on my local machine wants ddmmyyyy. I'm rebuilding the whole
app in C#.Net anyway so I don't think it's worth me running through
and making this jumble of code international date friendly, so my
question is, where exactly is the date format for ADO defined?
Windows? SQL Server?

View Replies View Related







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