var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: using parameterized call to add datetime
Using classic ASP...
I'm trying to get a date into SQL Server using parameterized call to a stored procedure.
this line is being flagged up as causing an error.
ADODB.Parameters error '800a0e7c'
Parameter object is improperly defined. Inconsistent or incomplete information was provided.
The DB is set to datetime and won't let me change the number of chars, so I think I have set the call to ask for the same thing. (goodness knows!)
com.parameters.append (com.CreateParameter("@submitDate", DATETIME, adParamInput, 8, now()))
So, can anyone see anything obviously wrong with this bit? The other lines are similarly formatted but just add varchars and seem OK.
Hello Darkmunk ,
I guess some thing ,if you use sql2005,you should use type Date instead of DateTime.
Try and reply me
my email didn't inform me of your post, sorry.
I started with DATE but it gives the same error. Also, I don't know how to format the parameter code in ASP, as 'data' is a reserved word.
I had my columns in the wrong order!
Parameterized calls (parameters.append) need to be in the correct order for the DB columns, it's not just like giving values to variables.
I also had the datetime bit wrong and didn't need a size value.
com.parameters.append (com.CreateParameter("@submitDate", adDBTimeStamp, adParamInput, , now()))
and the DB data type is 'dateTime'.
Feel free to chip in with improvements, but this works