Link to home
Start Free TrialLog in
Avatar of Overthere
Overthere

asked on

MS SQL SERVER and ADODB.commands

I would like to know what is the 'size' specification for the input parameter type  for adDBDate .
Seems I can find the size for everything but that one. Thank you.
Below is my code:
rsCmmds.Parameters.Append rsCmmds.CreateParameter("CreateDate",adDBDate,adParamInput, ,vcreated)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of YZlat
YZlat
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Overthere
Overthere

ASKER

Can it be larger than 8 ? I was hoping to insert a date in format of YYYY-mm-dd using a sproc
size is an optional parameter, I believe
Okay. So then if I leave out size it should work?? Guess I am going to find out!  I will post again either tonight or in morning and let you know on whither it successfully executed or not.
Using date data type will take 3 bytes and DateTime will take 8 byte. There is no need to specify size as it takes by default.
You don't set a size for adDBDate. Size parameter is mostly to use for strings or decimal variables.
adDBDate has a fixed sized of 8 bytes.
I thought it was 8 and I have found info. I had a date in the format of  YYYY-mm-dd, and executed the sproc from within MS SQL. It inserted it into the table with no errors. But I need to do it programmatically and if the sproc inserted in that format, shouldn't my  sproc do it in my program??
thank you