Re: ODBC SQLColumns() and Oracle synonyms....

From: Gregory Scarborough <scargs_at_yahoo.com>
Date: 2000/08/10
Message-ID: <3992C35A.589F0001_at_yahoo.com>#1/1


Justin:

Thanks for your reply.

I have found a way around the problem by doing the following:

    SQLExecDirect("select * from table where pkcol = 'invalidvalue'");     SQLNumResultCols();
    SQLColAttributes(..., SQL_COLUMN_NAME, ...);

Due to time constraints, I'll have to go with the work-around for now. I'm sorry but I don't believe I'm allowed to give out the exact details of the players in this problem. However, when I get a chance I'll try to recreate the problem by using some generic tables. If I can, I'd be happy to send you that information. By the way, I could recreate the problem by using the ODBCTE32.EXE utility from the ODBC SDK available from Microsoft as well as from my code.

Regards,

Gregory Scarborough

jocave_at_my-deja.com wrote:

> In article <399070E7.6E636C1A_at_yahoo.com>,
> Gregory Scarborough <scargs_at_yahoo.com> wrote:
> > I am experiencing problems using SQLColumns() against Oracle synonyms.
> > SQLColumns() returns all of the rows in the synonym (as it should) but
> > it also returns rows that used to be in the table. For instance, if
 the
> > table that is the target of the synonym is defined to have a column
> > TOTAL NUMBER(5) and then that table is dropped and recreated with a
> > column TOTAL VARCHAR2(5), SQLColumns() will return two entries for the
> > TOTAL column in its result set. One with a NUMBER type and the other
> > with a VARCHAR2 type.
> >
> > However, if I run SQLColumns() against the table that is the target of
> > the synonym, I get the correct results. The problem only manifests
> > itself when an Oracle synonym is used.
> >
> > The problem is recreatable using either the Microsoft Oracle ODBC
 Driver
> > or the Oracle 8.1.5 ODBC Driver. I have tested against Oracle 8.0.5
 and
> > Oracle 8.1.5 databases and get the same results. I have also tried to
> > do something similar with DB2 5.2 but was unable to recreate the
> > problem.
>
> This sounds like buggy behavior.
>
> Unfortunately, I've been unable to reproduce your problem on my system.
> Can you provide the exact SQL you're using to create the table, create
> the synonym, re-create the table, etc. as well as the exact ODBC calls
> you're making? Note that the simpler and easier the information you're
> able to provide, the more likely I am to try to get to the bottom of it.
>
> Feel free to e-mail this information to me personally at
> Justin.Cave_at_oracle.com rather than posting to these various groups.
>
> Justin Cave
> Oracle ODBC Development
> Opinions expressed herein are my own and do not reflect those of Oracle
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Aug 10 2000 - 00:00:00 CEST

Original text of this message