2007-10-23

Arithmetic overflow error converting expression to data type datetime

I got this error when I tried to convert string to datetime in query.

This is Culture problem.

What culture is your webserver?
What culture is your ASP.NET application using?
What culture is your database?

This is due to an inconsistency in the language settings between the web server and SQL server (or SQL server user).

By default, SQL Server users are set to "us_english" as the default language. The result is that different date formats are being used and are therefore not recognized by the database.

There are several options to remedy this situation:

1. Change the SQL user's default language to match the language settings on the SQL server.To do this, open SQL enterprise manager and connect to your database server. Expand Security -> Logins and open the properties dialog for the user that you are using to connect to the database. On the main properties page, change the language to equal the same language that is set on your web server.

2. Modify your connection stringOn your SQL connection string, add a parameter of Language= and set it equal to the correct language. For example, Language=British. (www.prezzatech.com)

11 comments:

Anonymous said...

Hello there everyone, I just registered on this superb discussion board and wished to say hey! Have a terrific day!

Anonymous said...

"There is clearly a good deal to understand about this. I believe you created some very good points in Characteristics also.Maintain operating ,great position!"

Anonymous said...

You got great points there, that's why I always love checking out your blog.

My blog:
solution rachat credit aussi rachat de credit refusé

Anonymous said...

howdy ! i am new here so i basically really want to expose me plus say hi there

Anonymous said...

koori dating [url=http://freeinternetdating.info/personals/swingers-personals-wigwam-colorado]swingers personals wigwam colorado[/url] dating websites for teens
dating new jersey directory guide job http://freeinternetdating.info/matchmaker/gainesville-florida-matchmaker wives dating other men
speed dating in fayetteville ar [url=http://freeinternetdating.info/singles/singles-cruises-tampa]naked in public dating[/url] flynn summer dating fanfiction

Anonymous said...

relationship service find dating match online [url=http://freeinternetdating.info/marriage/plant-city-florida-marriage-support]plant city florida marriage support[/url] new dating site of the week
teen dating science http://freeinternetdating.info/singles/singles-dance-barry not over ex dating someone new
dating a sexually abused girl [url=http://freeinternetdating.info/bride/russia-virgin-bride]newst dating sites[/url] christians dating mormons

Anonymous said...

who is jodie foster dating http://loveepicentre.com/testimonials/ evangeline lily dating dominic
tvst dating [url=http://loveepicentre.com/]interracial dating ireland[/url] yahoo im dating
paisley dating [url=http://loveepicentre.com/advice/]dating in preston[/url] older woman younger man dating sites [url=http://loveepicentre.com/user/lailabeby/]lailabeby[/url] guam dating

Anonymous said...

erin andrews dating maksim http://loveepicentre.com/map/ russian nude dating
jewish dating and singles site [url=http://loveepicentre.com/articles/]friends reunited dating uk[/url] christians in america dating
catholic singles and dating [url=http://loveepicentre.com/success_stories/]swinging singles dating[/url] free dating christian knoxville tn [url=http://loveepicentre.com/user/catherine4love/]catherine4love[/url] dating chickasha oklahoma

Anonymous said...

short guys dating tall girls http://loveepicentre.com/success_stories/ fox extreme dating
gay dating for large people [url=http://loveepicentre.com/map/]guys dating with shemale for free[/url] teen dating sex advice
chubby dating guys [url=http://loveepicentre.com]dating for gays bisexuals[/url] transgender dating site [url=http://loveepicentre.com/user/jtbrown7/]jtbrown7[/url] dating press releases

Anonymous said...

quebec city dating sites http://loveepicentre.com/ dating ladies from russian
midland dating [url=http://loveepicentre.com]black dating service ebony[/url] sex only dating sites
dating arrienne [url=http://loveepicentre.com/taketour/]weathly lesbian dating[/url] online dating in the usa [url=http://loveepicentre.com/user/flowers/]flowers[/url] housewife mumbai friendship dating seeking

Anonymous said...

5 25 speed dating nyc http://loveepicentre.com/ ideas online dating profile
classified online dating service for singles [url=http://loveepicentre.com/]free friend finder dating site[/url] online gay dating review
local latin dating [url=http://loveepicentre.com/]sarah vowell dating[/url] dating advice for women [url=http://loveepicentre.com/user/DonSquirta/]DonSquirta[/url] dating servises