X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5DDCA537D8 for ; Sat, 30 Apr 2005 07:06:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13987-09 for ; Sat, 30 Apr 2005 10:06:08 +0000 (GMT) Received: from Mail2.KONTENT.De (mail2.kontent.de [81.88.34.59]) by svr1.postgresql.org (Postfix) with ESMTP id 2F4D552A5C for ; Sat, 30 Apr 2005 07:06:01 -0300 (ADT) Received: from jedi.behrens.de (p508CD135.dip0.t-ipconnect.de [80.140.209.53]) by Mail2.KONTENT.De (Postfix) with ESMTP id BD57B3880F1 for ; Sat, 30 Apr 2005 12:06:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by jedi.behrens.de (Postfix) with ESMTP id CBC3939FEB for ; Sat, 30 Apr 2005 12:05:07 +0200 (CEST) Received: from jedi.behrens.de ([127.0.0.1]) by localhost (jedi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12524-03 for ; Sat, 30 Apr 2005 12:04:52 +0200 (CEST) Received: from anakin (anakin.behrens.de [192.168.150.240]) by jedi.behrens.de (Postfix) with ESMTP id 3D657398CA for ; Sat, 30 Apr 2005 12:04:50 +0200 (CEST) From: lothar.behrens@lollisoft.de To: pgsql-odbc@postgresql.org Date: Sat, 30 Apr 2005 12:06:22 +0200 MIME-Version: 1.0 Subject: Updating bool column problems Message-ID: <427374BE.10264.7971DC@localhost> X-mailer: Pegasus Mail for Windows (4.21c, DE v4.21c R1a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.248 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200504/138 X-Sequence-Number: 5297 Hi, I have detected that my test application - a console app, crashes when I t= ry to update a bool column. I haven't realized this with my GUI app. Here are the code snippets, that may relate to the problem: Binding the column of type SQL_BIT (rows is 2): buffer =3D malloc((sizeof(bool))*rows); _DataType =3D DataType; bound =3D 1; memset(buffer, 0, sizeof(bool)*rows); ret =3D SQLBindCol(hstmt, column, DataType, buffer, sizeof(bool), &cbBuffe= rLength); if (ret !=3D SQL_SUCCESS) { _LOG << "Error: Binding column '" << colName->charrep() << "' fail= ed!" LOG_ q->dbError("SQLBindCol()"); } break; Set the new data is like this: bool l =3D false; // or true depending on input *((bool*) buffer) =3D l; //memcpy(buffer, &l, sizeof(bool)); And this is the simple code to update it, where it crashes inside the psql= odbc.dll (SQLDummyOrdinal): retcode =3D SQLSetPos(hstmt, 1, SQL_UPDATE, SQL_LOCK_NO_CHANGE); Any ideas ? Thanks Lothar -- Lothar Behrens www.lollisoft.de Rosmarinstr 3 My public project: 40235 D=FCsseldorf http://sourceforge.net/projects/lbdmf