Re: problem odbc 8.0 with EOModeler

From: Eric E <whalesuit(at)bonbon(dot)net>
To: YL <elim(at)pdtnetworks(dot)net>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-bugs(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
Subject: Re: problem odbc 8.0 with EOModeler
Date: 2005-08-01 19:36:15
Message-ID: 42EE79AF.1060601@bonbon.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-odbc

Hi YL,
You may also want to check that EOModeler is not quoting strings
with double quotes (") rather than single-quotes (') in ODBC, say by
auditing the same call to MySQL. And maybe check out which ODBC version
calls EOModeler is calling, and sounds like it could potentially(!) be
using legacy calls to the ODBC driver. I can't say I know enough about
ODBC to be able to guide you on that, but I believe the pgsql-odbc list
has a number of members who can.

Cheers,

EE

YL wrote:

>Hi Kevin, you're right. When i type
>pname = '\'Elim\''
>in the EOModeler, it works (fetches the right match).
>i can even do
>pname like '\'Eli*\''
>with the right results.
>But what this mean in odbc level? (i don't need to add additional quotes for
>other odbc data sources)
>
>When query against numerical columns, things works quite well
>
>----- Original Message -----
>From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
>To: <whalesuit(at)bonbon(dot)net>; <elim(at)pdtnetworks(dot)net>;
><pgsql-bugs(at)postgresql(dot)org>
>Sent: Monday, August 01, 2005 12:31 PM
>Subject: Re: [BUGS] problem odbc 8.0 with EOModeler
>
>
>It looks like this is being treated on the server as though the statement
>is:
>
>SELECT t0."pname", t0."person_id"
> FROM "person" t0 WHERE t0."pname" = Elim
>
>rather than:
>
>SELECT t0."pname", t0."person_id"
> FROM "person" t0 WHERE t0."pname" = 'Elim'
>
>
>
>
>>>>"YL" <elim(at)pdtnetworks(dot)net> 08/01/05 1:07 PM >>>
>>>>
>>>>
>Thanks Eric and Kevin for the responses to my post.
>
>My Testing table was
>Person (person_id int not null, name varchar(32))
>and my query typed in EOModeler is
> name = 'Elim'
>
>EOModeler has an interface letting you specify connection method.
>There are adaptors (oracle, informix, sybase...) and odbc data source
>the choose from.
>
>My headache is that for the same setting and table in difference
>database server and odbc datasource, i have no problem with the
>query except when i switch the data source to postgresql odbc.
>
>It has two things not normal to me: [unlike other database and odbc,
>postgresql-odbc reveals no database column type list to EOModeler
>which i believe a missing of some api standard to other odbc
>implementations.
>For example, mysql odbc lets EOModeler show the available column
>types such as int, mediumint, tinyint, char, varchar, text ....So that
>one can specify column types when model an entity (table)] and the error
>msg (from EOModeler)
>
>SQLExecDirect in -[ODBCChannel evaluateExpression:(<ODBCSQLExpression:
>"SELECT t0."pname", t0."person_id" FROM "person" t0 WHERE t0."pname" = ?"
>withBindings:(1:Elim(pname))>)]
>S1000-7: ERROR: column "elim" does not exist
>(sorry I took the quotes around the column name 'pname' in my previous post)
>
>Means that somehow my matching value 'Elim' been interpreted as column
>name!!!
>since the same query works perfect with other kind of odbc data sources, i
>guess
>this really indicate that EOModeler and postgresql-odbc can not communicate
>correctly. in other words, postgresql-odbc has special API's that not make
>sense to
>EOModeler.
>
>
>
>----- Original Message -----
>From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
>To: <elim(at)pdtnetworks(dot)net>; <pgsql-bugs(at)postgresql(dot)org>
>Sent: Monday, August 01, 2005 8:25 AM
>Subject: Re: [BUGS] problem odbc 8.0 with EOModeler
>
>
>Is the column name "Elim" or "elim"? If the former, try putting quotes
>around it, as required by the ANSI and ISO standards for mixed case
>identifiers. Some database products fail to comply with the standards in
>this respect. PostgreSQL comes close, although it treats unquoted
>identifers as all lower case rather than all upper case as required by the
>standards.
>
>-Kevin
>
>
>
>
>>>>"YL" <elim(at)pdtnetworks(dot)net> 07/30/05 3:48 PM >>>
>>>>
>>>>
>I've used EOModeler with odbc for MS SQL Server,
>MySQL and MS Access with no problem. But got
>problem with postgre odbc driver. (the newest one)
>
>EOMOdeler cannot get postgresql column types' info
>through odbc. Also, It cannot interact with EOModeler
>for very simple query:
>
>SQLExecDirectin - [ODBCChannel evaluateExpression:
>(<ODBCSQLExpression: "SELECT t0.pname,t0.person_id
>FROM person t0 WHERE t0.pname = ? " withBindings:
>(1:Elim(name)) >)]
>S 1000-7: ERROR: column 'elim' doesnot exitst
>
>EOModeler is an app in WebObjects (www.apple.com)
>I'm using version 4.5.1 ObjC. EOModeler has adaptors
>for Oracle, Infomix, Sybase, Openbase. All works very
>well.
>
>My guess is that postgresql-odbc has some non-standard
>api and so EOModeler fails to work with it.
>
>
>
>
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Page 2005-08-01 20:06:18 Libpq free bug? (Was: [ODBC] IIS Postgres ASP ADO - Problem)
Previous Message Kevin Grittner 2005-08-01 19:34:52 Re: problem odbc 8.0 with EOModeler

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2005-08-01 20:06:18 Libpq free bug? (Was: [ODBC] IIS Postgres ASP ADO - Problem)
Previous Message Kevin Grittner 2005-08-01 19:34:52 Re: problem odbc 8.0 with EOModeler