Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

adDate parameter to stored proc.
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



Report this thread to moderator Post Follow-up to this message
Old Post
Agoston Bejo
12-30-04 01:55 PM


Re: adDate parameter to stored proc.
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/in....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"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
12-30-04 01:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:42 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.