dim dData as date
dim strSQL as string
dDate = '01/16/2005'
I am using Visual Basic .NET to develop an application. Temporarily, my machine is acting as a server. But, only 1 machine from the LAN tried to enter data, it's
working strangely. I tried to do remote debugging and these are the things i noticed... i simplied the code as below...
strsql = "SELECT * from tblA where StopDate = '" & dDate & "' "
All the machine will have strsql = SELECT * from tblA where StopDate = '01/16/2005' .
But, 1 machine SQL statement appears as strsql = SELECT * from tblA where StopDate = '16/01/2005' which causes OUT of range date (month becomes 16). Why????Why??? Why when i try to concatenate, it is automatically switching the date again.
I already checked the Regional settings and set the date to M/d/yyyy , MM/dd/yyyy and also yyyy-MM-dd. But, nothing seems to help the 1 machine.
Any suggestions greatly appreciated.