Re: Inserting regional settings specific data into sql server
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Thu, 9 Feb 2006 08:05:45 +0100
Niketa,
DateTime and Short Time are not notated in SQL server in any local variant.
It is notated in ticks starting at 1753 and 1900.
If you avoid giving DateTimes as strings to the SQL Sever, than you will not
have any problem.
Strings can be converted in your program by the commands.
CDate (Visual Basic)
DateTime.Parse
Convert.ToDateTime
To give the datetime information to the server you "should" use parameters.
See this as most simple sample.
http://www.vb-tips.com/default.aspx?ID=886bba68-8a2f-4b99-8f66-7139b8970071
By the way InvariantCulture is for inside the English Language culture. The
most people in that use September 11 as date while the most countries use 11
September as date.
I hope this helps,
Cor
.
- Prev by Date: Re: multiple inserts or updates
- Next by Date: Re: Are there any DbCommandBuilder implementation examples?
- Previous by thread: Re: Encoded Confusion
- Next by thread: Re: Inserting regional settings specific data into sql server
- Index(es):
Relevant Pages
|
Loading