What is the data type/format of fields returned by a recordset using ADO ?
Does it depend on the source language (Javascript/Vbscript)?
My problem :
I'm using ASP with Access and Javascript.
I read the data from the user table and saved the datetimestamp from an
access database as follows..
user_dts = oRs(3).value
This variable was displayed as a hidden field on the form.
When the user info was changed on the form and submitted, i tried to read
the dts from the user table again.
user_current_dts = oRs(3).value
I retrieved the previous datetimestamp that was stored on the form by
using the request object
user_dts = Request.Form("user_dts");
I compared user_dts and user_current_dts to see if the datetimestamp had
been changed. This comparison did not work. The datetimestamps were equal
but it was always executed the code in the != path.
if (user_dts != user_current_dts)
{
msg= "User cannot be updated as the record has been updated by another
person
}
else
{
.....
...
msg= "User Updated"
}
If i display the user_dts and user_current_dts using the response object
both of them display 2/19/03(this is the default date format in access).
So, i dont know why the if statement fails.
On the other hand if i add quotes when setting the variables
user_dts = oRs(3).value + "" ;
user_current_dts = oRs(3).value + "";
the if statement follows the equal path.
If i display user_dts with the Response object, it displays the date in a
totally different format - Wed Feb 19 00:00:00 CST 2003
Why does adding the quotes change the format of the date and make it
follow the equal path ?
Is there any good tutorial for using ADO in Javascript which talks about
the data types and formats of fields returned in a recordset ?
Regards,
Sara