[TD5.2] SQLServer 2005/2008: Error 20065

General discussion forum about all databases other than SqlBase.
wsamstag
Germany
Posts: 7
Joined: 13 Apr 2017, 09:41
Location: Munich, Germany

[TD5.2] SQLServer 2005/2008: Error 20065

Post by wsamstag » 20 Jan 2010, 12:23

This error occurs on SQLServer via ODBC. On older versions this command works and on Oracle it works with TD 5.2. But not with TD 5.2 and SQLServer:

20065 - [Microsoft][ODBC SQL Server Driver]Ungültige Zeichenfolgen- oder Pufferlänge.
(invalid string or buffer length)

This error occurs on bigger SQL statements like this command to update data from a form:

UPDATE FA_BETT SET
KOPFTEXT = :sKopftext, KOPFTEXT_FETT = :nKopftext_Fett, BETREFF = :sBetreff, BETREFF_FETT = :nBetreff_Fett,
FUSSTEXT = :sFusstext, FUSSTEXT_FETT = :nFusstext_Fett, UEBERSCHRIFT = :sUeberschrift, UEBER_FETT = :nUeberschrift_Fett,
GRUSSTEXT = :sGrusstext, GRUSSTEXT_FETT = :nGrusstext_Fett, ANLAGE = :sAnlage, ANLAGE_FETT = :nAnlage_Fett,
BEZUG_1A = :sBezug_1a, BZ_1A_FETT = :nBezug_1a_Fett, BEZUG_1B = :sBezug_1b, BZ_1B_FETT = :nBezug_1b_Fett,
BEZUG_2A = :sBezug_2a, BZ_2A_FETT = :nBezug_2a_Fett, BEZUG_2B = :sBezug_2b, BZ_2B_FETT = :nBezug_2b_Fett,
BEZUG_3A = :sBezug_3a, BZ_3A_FETT = :nBezug_3a_Fett, BEZUG_3B = :sBezug_3b, BZ_3B_FETT = :nBezug_3b_Fett
WHERE SATZNUMMER = :sSatznummer

I got the error when I update a field greater then 254 char and only when the field is empty??????

Thanks,

Werner

Jeff Luther

Re: [TD5.2] SQLServer 2005/2008: Error 20065

Post by Jeff Luther » 21 Jan 2010, 00:29

What is the MS SS column type for the field > 254 chars? Are you calling SqlSetLongBindDatatype() for that field before SqlExecute?

wsamstag
Germany
Posts: 7
Joined: 13 Apr 2017, 09:41
Location: Munich, Germany

Re: [TD5.2] SQLServer 2005/2008: Error 20065

Post by wsamstag » 21 Jan 2010, 09:55

Jeff,

I got a emergency patch ( Build 14807) from a collegue and now the program works without errors.

Jeff Luther

Re: [TD5.2] SQLServer 2005/2008: Error 20065

Post by Jeff Luther » 22 Jan 2010, 19:26

Thanks for letting me know!

wsamstag
Germany
Posts: 7
Joined: 13 Apr 2017, 09:41
Location: Munich, Germany

Re: [TD5.2] SQLServer 2005/2008: Error 20065

Post by wsamstag » 27 Jan 2010, 10:13

I had been glad too early. When Insert - no error, when Update and the variable is not empty - no error, when Update and the variable is empty - error 20065.

The MS SS column type for the field is varchar(400) and I called SqlSetLongBindDatatype() before SqlExecute?

Any idea?

igorok
Slovenia
Posts: 41
Joined: 20 Apr 2017, 13:19
Location: Slovenia

Re: [TD5.2] SQLServer 2005/2008: Error 20065

Post by igorok » 17 Feb 2010, 17:22

Can I also get that emergency patch?

Igor

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests