Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > adDate parameter to stored proc.

Reply
Thread Tools

adDate parameter to stored proc.

 
 
Agoston Bejo
Guest
Posts: n/a
 
      12-30-2004
Hi!
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?

Thx,
Agoston


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      12-30-2004
Agoston Bejo wrote:
> Hi!
> 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?
>


You need to use adDBTimestamp, not adDate.

You might want to try out my stored procedure code generator available at
http://www.thrasherwebdesign.com/ind...asp&c=&a=clear

If your procedure has no output parameters, and you are not interested in
retrieving the return parameter, you may want to consider using the
stored-procedure-as-connection-method technique instead of the explicit
Command object:

http://tinyurl.com/jyy0

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter Type/Size Property Values for VARCHAR(MAX) Stored Proc Parameter jcpc ASP .Net 2 01-26-2011 11:48 AM
get out parameter from oracle stored procedure raymond chiu ASP .Net 1 01-21-2006 07:15 AM
Stored Procedure/Parameter problem ElmoWatson ASP .Net 1 08-06-2003 01:19 AM
Called a Stored Procedure , decimal parameter Mona ASP .Net 1 06-27-2003 02:08 PM
Call a stored procedure with decimal parameter Mona ASP .Net 2 06-27-2003 01:31 PM



Advertisments