Link to home
Start Free TrialLog in
Avatar of jana
janaFlag for United States of America

asked on

Problems Microsoft SQL 2005

We have a situation when a PC connects to the Ms SQL instance, that it would halt a specific areas and the message that appears is "data type error.

What can be causing this?
Avatar of jana
jana
Flag of United States of America image

ASKER

Ooops, wrong error message.  Tha message is:

Msg 242, Level 16, State 3, Line 3
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Open in new window


When debuging the VB.NET apps we see the error happens in the line where the script is:

SET @Var = (SELECT CONVERT(VARCHAR,GETDATE(),103))

Open in new window


We noticed that the Server is Ms SQL 2005 English version, but another server is Spanish version and it runs ok.  We also noticed that doing the query directly in the Studio SQL, gave same result in 2005 SQL version.

We tested other values beside 103 and it works.  We thought it was Regional, but changed it, still error.

Please adveice
SOLUTION
Avatar of Giuseppe Pizzuto
Giuseppe Pizzuto
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

It did work.  Question, can this be an issue as I the install parameters of the SQL instance?
>It did work.
My suggestion?

>Question, can this be an issue as I the install parameters of the SQL instance?
Not sure what you mean.
Avatar of jana

ASKER

All suggestions worked.

What we mean by "if this can be a SQL instance issue", is since in server SQL 2000 worked excellently and in the 2005 didnt.  So can it be the actual installation?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

what is "culture"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Understood.

One last question; if truly based on "culture settings", should we reinstall SQL?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Thanx, good link.

Should we reinstall SQL or just modify the script as recommended?
Avatar of jana

ASKER

or change collation?

which?

Please advice.
Change script is a quick fix. Other fixes would need more investigation. Do you have a DBA?
Avatar of jana

ASKER

Don't understand by change script and quick script.  We would to just a simple SELECT various time within MsAccess SQL scripting area.

All googles searches has indicated that it not possible so this where we rely on EE expert advice.

No, we don't have a DBA
>Don't understand by change script and quick script.  We would to just a simple SELECT various time within MsAccess SQL scripting area

Your question was whether you should change the select statement, reinstall sql, or change collation. My response was that changing the select statement (sql script) is a quick fix if its working. Reinstalling and changing collation is also an option.
Avatar of jana

ASKER

Thanx