MSSQL Query in VB.Net Fails

recordset , MSSQL , vb.net India
  • 7 years ago

    I have these queries in my program getservertime function which gets the server time by executing SELECT getdate() as ServerTime. This Query is followed by update myusers set LastVisiteddate = '" & getservertime() & "' where StrUsername = '" Uname & "'"

    Few of the times I find that the value of LastVisiteddate is updated as "1900-01-01 00:00:00.000" which is the 0 value for date. What could be wrong 1) Is this happenning because of the SQL server Load at that particular point of time. 2) Is server not responding the query in time, if so should i introduce a delay between these two queries. Please assist me

  • 7 years ago

    I have these queries in my program getservertime function which gets the server time by executing SELECT getdate() as ServerTime. This Query is followed by update myusers set LastVisiteddate = '" & getservertime() & "' where StrUsername = '" Uname & "'"

    Few of the times I find that the value of LastVisiteddate is updated as "1900-01-01 00:00:00.000" which is the 0 value for date. What could be wrong 1) Is this happenning because of the SQL server Load at that particular point of time. 2) Is server not responding the query in time, if so should i introduce a delay between these two queries. Please assist me

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup