From: Antonio Pennino <a.pennino@nocerainformatica.net>
To: pgsql-odbc@postgresql.org
Subject: Re: problem with CVS version
Date: Thu, 29 Jul 2004 17:33:13 +0200
Message-ID: <410934D9.3145.1BC587D@localhost> (raw)
In-Reply-To: <E7F85A1B5FF8D44C8A1AF6885BC9A0E41A74DB@ratbert.vale-housing.co.uk>
Subject: RE: [ODBC] problem with CVS version
Date sent: Thu, 29 Jul 2004 08:46:02 +0100
From: "Dave Page" <dpage@vale-housing.co.uk>
To: "Antonio Pennino" <a.pennino@nocerainformatica.net>,
<pgsql-odbc@postgresql.org>
> Yes, I think it is the DM.
the solution *should* be the SQLSetConnectAttr().
No, it not work... my code is this:
_______________________________________________________________
long numero = SQL_AA_TRUE;
int valore = 0;
short shval = 0;
long native = 0;
SQLRETURN r = 0;
int n = 0;
char state[8] ; memset(state,0,sizeof(state));
char text[99] ; memset( text,0,sizeof(text));
/**/ r = SQLSetConnectAttr(hdbc,SQL_ATTR_ANSI_APP, // <<-!
(SQLPOINTER)&numero,
valore);
if (r)
{
r = SQLGetDiagRec(SQL_HANDLE_DBC,hdbc,1 ,
(unsigned char *) state,
&native,
(unsigned char *) text,
sizeof(text),&shval);
}
_______________________________________________________________
The result are:
a) the SQLSetConnectAttr() return -1
b) the SQLGetDiagRec() return:
. state = "S1092"
. text = "[...][...] Option type out of range"
Identical result i have with ms-access, perhaps are wrong the
arguments? I have take the idea from here:
http://publib.boulder.ibm.com/infocenter/db2v8luw/
index.jsp?topic=/com.ibm.db2.udb.doc/ad/c0008616.htm
============================================
Antonio Pennino
Nocera Informatica s.r.l.
telefono: 035/4219033
telefax : 035/4219050
e-mail : a.pennino@nocerainformatica.net
============================================
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: a.pennino@nocerainformatica.net
Subject: Re: problem with CVS version
In-Reply-To: <410934D9.3145.1BC587D@localhost>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E41A74DB@ratbert.vale-housing.co.uk> <410934D9.3145.1BC587D@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox