Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > DateTime in Paramtized asp query?

Reply
Thread Tools

DateTime in Paramtized asp query?

 
 
Guest
Posts: n/a
 
      07-08-2005
How does one paramtized a date in asp for a stored procedure that is
expecting DateTime?


if oRS.eof then
'// SAFE TO INSERT STORY....

CREATE Procedure spr_AddStory

oCmd.Parameters.append oCmd.CreateParameter("StoryTitle", adVarChar,
adParamInput,100,pStoryTitle)
oCmd.Parameters.append oCmd.CreateParameter("StoryDate datetime,
'//??????????????)

Thanks
Jason


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      07-08-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> How does one paramtized a date in asp for a stored procedure that is
> expecting DateTime?
>
>
> if oRS.eof then
> '// SAFE TO INSERT STORY....
>
> CREATE Procedure spr_AddStory
>
> oCmd.Parameters.append oCmd.CreateParameter("StoryTitle", adVarChar,
> adParamInput,100,pStoryTitle)
> oCmd.Parameters.append oCmd.CreateParameter("StoryDate datetime,
> '//??????????????)
>
> Thanks
> Jason


The correct datatype constant is adDBTimeStamp.

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

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
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      07-08-2005
(E-Mail Removed) wrote:
> How does one paramtized a date in asp for a stored procedure that is
> expecting DateTime?
>
> oCmd.Parameters.append oCmd.CreateParameter("StoryDate datetime,
> '//??????????????)


The complete list is here:
http://msdn.microsoft.com/library/en...tatypeenum.asp



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


 
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
Re: [2.4.4] creating a datetime.datetime from an XML xs:dateTime skip@pobox.com Python 2 01-06-2009 01:31 PM
[2.4.4] creating a datetime.datetime from an XML xs:dateTime Martin Python 0 12-27-2008 08:08 PM
mx.DateTime to datetime.datetime mp Python 1 07-28-2006 10:57 PM
datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Christos TZOTZIOY Georgiou Python 3 09-13-2003 10:44 AM
RE: datetime: .datetime-.datetime = .timedelta, .time-.time=TypeError ? Tim Peters Python 0 09-09-2003 12:57 AM



Advertisments