Psqlodbc and Centura: here it is a patch

From: "Matteo Cavalleri" <theos(at)bp(dot)lnf(dot)it>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Psqlodbc and Centura: here it is a patch
Date: 2001-02-20 16:33:47
Message-ID: 3A92AA7B.26052.1D931CD@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

First of all I have to thank Byron for the very well written source
code ,
clearness and elegance. Looking that sources has been a pleasure!

[Small note for Centura users: In order to use PostgreSQL and
Centura
TEAM developer you need to set up the configuration file DCC.INI
matching
each data type provided by the ODBC driver with each data type
available
in the Centura environment.] After configuring DCC.INI a simple
select
works well. But if you use a function in the select clause and you
put a
parameter into the where clause you will get the error:

PostgreSQL:3No query has been assigned to this statement.;

Tracking mylog file, I saw that centura calls SQLDescribeCols
before
SQLBindParameter. I am not an ODBC wizard (and I don’t know a
bit of
Centura but I need to convince a friend to use PostgreSQL:-)! and
this
seems to cause some troubles.

If SQLDescribeCol has to work on simple fields of the working table
the
work can be done and there are no errors. If SQLDescribe has to
work on
some computations (eg. a to_char() conversion or a + operator) ,
the
select must be evaluated. In this case, if is there a parameter in the
where clause (still unBinded) , the error comes up.

So here it is a patch for this. The unBinded parameters are
temporary set
to NULL, permitting SQLDescribeCol to run. This behavior can be
enabled/disabled clicking in the new check box named "Set
unBinded Params
to NULLs". The default is false.

I don't know if the problem will come with other app builders.
(I hope the patch could be applyed before any other modifications
on the
source code. For any problem you can contact me to { HYPERLINK
mailto:theos(at)bp(dot)lnf(dot)it }theos(at)bp(dot)lnf(dot)it )

Best Regards

Matteo Cavalleri
IRCCS E.Medea
Bioengineering Lab.
Via D.L.Monza 20
23842 Bosisio Parini (LC) - ITALY
Tel. +39-031-877274 / 111
Fax +39-031-877499

Attachment Content-Type Size
unknown_filename text/plain 5.1 KB

Browse pgsql-odbc by date

  From Date Subject
Next Message Andrea Aime 2001-02-21 07:15:49 Re: Strange behaviour with Autocad/ODBC
Previous Message Ross J. Reedstrom 2001-02-20 15:01:29 Re: Strange behaviour with Autocad/ODBC