Results 1 to 2 of 2
Feb 23, 2012, 17:20 #1
- Join Date
- Feb 2012
- 0 Post(s)
- 0 Thread(s)
very strange - text in variable gets changed
I'm able to put it into a variable and/or a session variable looking like this:
2012-02-23 05:52 PM
Then I want to use it to update a nvarchar(50) SQL database column, but the column gets updated to this:
Then I do some debugging and I see the update query is this:
Update tblRecords set ws_DateTime = '2012-02-23 04:53 PM' where recordid = 12345
If I run the update query in query analyzer, it properly updates the column to 2012-02-23 05:52 PM
But if I let the update query run from the asp page, it improperly updates the column to --:
If I hard-code the string into the update query, and let it run from the page, it works properly.
But if I construct it on the fly in the page, it does not work properly.
What is going on, and is there anything I can do? Hard-coding is not a solution I can use.