freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Problem with smalldates in SP
- Date: Fri, 30 Sep 2005 11:25:05 -0400
> From: Carlo Andreoli
> Sent: Thursday, September 29, 2005 9:40 PM
>
> I run Freetds from FreeBSD. I connect to SQL Server with
>
> carlo@qs414% /usr/local/bin/odbctest "DSN=bla;UID=bla;PWD=bla"
>
> and I type the following stored procedure, that used to rule:
>
> SQL>execute SpInsertDaCda 0, 11, 142, 'chas', 'chas',
> '1990-05-12','british', 'm', '2005-08-12', '2005-09-30', 0,
> 6,0,0,2,0,'',0,0
>
> I get:
>
> [FreeTDS][SQL Server]The conversion of char data type to smalldatetime
data
> type resulted in an out-of-range smalldatetime value., SQLSTATE=22007
...
> SQL>select cast('2005-09-12' as smalldatetime)
>
> and it works fine, since I get: result set 1 returned 1 rows.
http://www.microsoft.com/technet/prodtechnol/sql/70/proddocs/diag/part3/
75528c12.mspx
http://www.aspfaq.com/show.asp?id=2023
This is SQL Server error #296, nothing to do with FreeTDS. To
demonstrate that, turn on TDSDUMP and you'll see the error being
returned by the server.
I suspect either the language setting or the default date format is
wrong (where "wrong" means "different from what you expect"). Cf. "SET
DATEFORMAT" and "DBCC USEROPTIONS".
HTH.
--jkl
-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.
-
[freetds] Problem with smalldates in SP,
Carlo Andreoli, 09/29/2005
- <Possible follow-up(s)>
-
Re: [freetds] Problem with smalldates in SP,
Lowden, James K, 09/30/2005
- Re: [freetds] Problem with smalldates in SP, Carlo Andreoli, 09/30/2005
Archive powered by MHonArc 2.6.24.