freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] problem Stored Procedures MSSQL
- Date: Fri, 30 Oct 2009 15:22:24 +0100
2009/10/29 demetrius albuquerque <demetrius.albuquerque AT yahoo.com.br>:
> I'm using freeRTS+pymssql+python to work with MSQQL 2005. I use stored
> procedure to insert data in table and return a keydata. But I ever have the
> same error, my stored procedure just give a empty result. My SP is ok, I use
> this with Visual Studio and this work fine.
> When I use a procedure only to check some field on table is OK too.
> freeTDS.log is here http://paste.archlinux-br.org/1347
> Anyone know what is that?
>
Looking at logging you can note
dbutil.c:87:msgno 5703: "Changed language setting to Português."
dbutil.c:87:msgno 5701: "Changed database context to 'dbSFC'."
write.c:136:tds_put_string converting 77 bytes of "exec
SP_SFC_Numero_Serie_Posto_Ins
'1/1/1900','N','E','736382202787',78,157,1"
so your query is sent to server verbating
dbutil.c:87:msgno 242: "The conversion of a char data type to a
datetime data type resulted in an out-of-range datetime value."
server does not like the '1/1/1900', perhaps is not Portuges encoded ??
dbutil.c:87:msgno 282: "The 'SP_SFC_Turno_Producao_Get_Data' procedure
attempted to return a status of NULL, which is not allowed. A status
of 0 will be returned instead."
SP_SFC_Turno_Producao_Get_Data is called internally by
SP_SFC_Numero_Serie_Posto_Ins
dbutil.c:87:msgno 547: "The INSERT statement conflicted with the
FOREIGN KEY constraint "Refsfc_turno_producao75". The conflict
occurred in database "dbSFC", table "dbo.sfc_turno_producao", column
'tup_id_turno_producao'."
probably depending on previous error.
So the problem seems date, probably due to language settings. Are you
sure that Visual Studio use Portugues language?? You could try with
odbc escape sequence like "exec SP_SFC_Numero_Serie_Posto_Ins {d
'1900-01-01'},'N','E','736382202787',78,157,1"
freddy77
-
[freetds] problem Stored Procedures MSSQL,
demetrius albuquerque, 10/29/2009
-
Re: [freetds] problem Stored Procedures MSSQL,
Frediano Ziglio, 10/30/2009
- Re: [freetds] problem Stored Procedures MSSQL, Thompson, Bill D (London), 10/30/2009
-
Re: [freetds] problem Stored Procedures MSSQL,
Frediano Ziglio, 10/30/2009
Archive powered by MHonArc 2.6.24.