SOLVED: [unixODBC-support] Record CUSTOMERS has no fields

Ilming Elvira (Semizen) elvira.ilming at niedermeyer.at
Thu Sep 15 09:39:02 BST 2005


Hello world!

Thank you for the hints regarding uppercase(ORACLE) and lowercase(PostgreSQL) DB.

Finally we solved this problem with an "easy" workaround:

JUST PUT THE POSTGRESQL TABLE NAME IN LOWERCASE UNDER QUOTES:

SQL> l
  1  select "cus_user" from "customers"@myodbc
  2* where rownum < 5
SQL> /

cus_user
----------
tradnetter
tradnetter
tradnetter
tradnetter

YEAH YEAH YEAH, it works!

Have a great Thursday,
Elvira

Details to this problem which could be found in the trace files:
=================================================================
PREPARATION FOR select * from customers SUCCEEDS:
=================================================================
[ODBC][21561][SQLPrepare.c][189]
		Entry:
			Statement = 0x835c950
			SQL = [select * from "CUSTOMERS"][length = 25 (SQL_NTS)]
[ODBC][21561][SQLPrepare.c][364]
		Exit:[SQL_SUCCESS]

=================================================================
PROBLEM TO FIND OUT THE NUMBER OF COLUMNS, SQLNumResultCols IS 0!!!
=================================================================

[ODBC][21561][SQLNumResultCols.c][149]
		Entry:
			Statement = 0x835c950
			Column Count = 0xffffb056
[ODBC][21561][SQLNumResultCols.c][234]
		Exit:[SQL_SUCCESS]
			Count = 0xffffb056 -> 0


-----Ursprüngliche Nachricht-----
Von: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com]Im Auftrag von Ilming
Elvira (Semizen)
Gesendet: Mittwoch, 14. September 2005 17:39
An: Support for the unixODBC project
Betreff: [unixODBC-support] Record CUSTOMERS has no fields



Hello again from good old Austria,

finally we managed to compile unixODBC and the postgreSQL ODBC Driver as a 32 bit version, to be used with ORACLE (as ORACLE has not licensed and does not support 64bit).

Now we can connect but we cannot select data:

crm_prod=> \dt
                       List of relations
 Schema |               Name               | Type  |   Owner
--------+----------------------------------+-------+------------
 crm    | address                          | table | crm
 crm    | customers                        | table | crm


SQL> create public database link myodbc connect to "crm" identified by "pwd" using 'TEST'

Database link created.


SQL> select * from dual at myodbc;

D
-
X

SQL> select cus_id from customers at myodbc;
select cus_id from customers at myodbc
                   *
ERROR at line 1:
ORA-00942: table or view does not exist
[Generic Connectivity Using ODBC]Record CUSTOMERS has no fields. Loading failed
ORA-02063: preceding 2 lines from MYODBC

Is this a "known feature"?

We appreciate any comment from you, so thanX in advance and have a great evening,

Elvira

_______________________________________________
unixODBC-support mailing list
unixODBC-support at easysoft.com
http://mail.easysoft.com/mailman/listinfo/unixodbc-support




More information about the unixODBC-support mailing list