Re: problem with CVS version

From: "Antonio Pennino" <a(dot)pennino(at)nocerainformatica(dot)net>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: problem with CVS version
Date: 2004-07-29 15:33:13
Message-ID: 410934D9.3145.1BC587D@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Subject: RE: [ODBC] problem with CVS version
Date sent: Thu, 29 Jul 2004 08:46:02 +0100
From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Antonio Pennino" <a(dot)pennino(at)nocerainformatica(dot)net>,
<pgsql-odbc(at)postgresql(dot)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(dot)pennino(at)nocerainformatica(dot)net
============================================

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Mario Soto 2004-07-29 17:02:37 Postgresql odbc column bytea problem
Previous Message Philippe Lang 2004-07-29 13:23:57 Re: bad performance for Access, ODBC and Postgres