Received: from mout02.kundenserver.de (mout02.kundenserver.de [195.20.224.133]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f08KDNB30518 for ; Mon, 8 Jan 2001 15:13:23 -0500 (EST) (envelope-from zuschlag2@online.de) Received: from [195.20.224.151] (helo=mrelay01.kundenserver.de) by mout02.kundenserver.de with esmtp (Exim 2.12 #2) id 14FifR-0002S2-00 for Pgsql-interfaces@postgresql.org; Mon, 8 Jan 2001 21:13:21 +0100 Received: from p3e9eb0c6.dip0.t-ipconnect.de ([62.158.176.198] helo=jozu) by mrelay01.kundenserver.de with smtp (Exim 2.12 #2) id 14FifL-00080h-00 for Pgsql-interfaces@postgresql.org; Mon, 8 Jan 2001 21:13:15 +0100 From: "Johann Zuschlag" To: "Pgsql-interfaces@postgresql.org" Date: Mon, 08 Jan 2001 21:13:07 +0100 Reply-To: "Johann Zuschlag" X-Mailer: PMMail 2000 Professional (2.10.2010) For Windows 98 (4.10.2222) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: psqlodbc error traced, please help! Message-Id: X-Archive-Number: 200101/72 X-Sequence-Number: 681 Hi, Sorry, I already sent this, but I didn't get help. I'm using a commercial application which is crashing while trying to INSERT sets into tables (using psqlodbc.dll). SELECT works. I did some tracing: It crashes in module convert.c / copy_statement_with_parameters in function: convert_special_chars(char *si, char *dst, int used) The access violation appears at: if (si[i] == '\r' && i+1 < strlen(si) && si[i+1] == '\n') si = 0x00000001 used = -103 It seems that it runs into an access violation, since 'si' has been assigned a wrong value. Also 'used = -103' doesn't seem to be healthy value. 'dst' seems to be alright. convert_special_chars was called in copy_statement_with_parameters: convert_special_chars(buf, &new_statement[npos], used); 'buf' seems to be the same like 'buffer': So 'used' and 'buffer' where assigned at (in copy_statement_with_parameters): /* Assign correct buffers based on data at exec param or not */ if ( stmt->parameters[param_number].data_at_exec) { used = stmt->parameters[param_number].EXEC_used ? *stmt->parameters[param_number].EXEC_used : SQL_NTS; buffer = stmt->parameters[param_number].EXEC_buffer; } else { used = stmt->parameters[param_number].used ? *stmt->parameters[param_number].used : SQL_NTS; buffer = stmt->parameters[param_number].buffer; } Well, here my knowledge ends. Something seems to be wrong with the ODBC parameters supplied by my application, but: Same application works flawless with MS-SQL-ODBC and ORACLE-ODBC. So IMHO there must be a problem in psqlodbc.dll. Even though I admit that a buggy call might be accepted in MS-ODBC due to another bug. :-) Could somebody point me in the correct direction? Any hints? Patches? Or what else should I trace? I tried with the standard source and cvs, same error. By the way, I volunteer to test the driver. regards Johann