DateTime in Paramtized asp query?

G

Guest

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
 
B

Bob Barrows [MVP]

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/index.asp?pi=links&hp=links.asp&c=&a=clear

Bob Barrows
 
D

Dave Anderson

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-us/ado270/htm/mdcstdatatypeenum.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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top