Board index » delphi » Lookup fields on some systems don't work with Oracle ODBC

Lookup fields on some systems don't work with Oracle ODBC

I have a strange problem. I'm using the Oracle ODBC driver to connect
to an Oracle database.  I compile and run my D5 app on my Win2k system;
it runs fine.

I then try to run it on other systems, and although I can see the
records stored in the database with my application, the lookup fields
are blank. DBLookupComboBoxes show nothing, and lookup fields on
DBGrids show nothing also. The same executable on my system shows the
same records in the same database but with lookup fields actually
showing the values.

My system, as I said, is Win2k with D5. The three on which I tested my
application are: (1) a Win98 with D5 installed; (2) a Win98 without
Delphi; and (3) a WinNT4 without Delphi. On those without Delphi I
used InstallShield to install the BDE together with my application. On
all three I've installed the Oracle client and the ODBC seems to run
fine; I can see all Oracle tables and records through MS Access, for
example.

 

Re:Lookup fields on some systems don't work with Oracle ODBC


I know this sounds obvious, but try explicitly opening the queries
feeding the lookups (if you haven't done this already).  This is not a
W2k issue, but I have found that sometimes lookups seem to open the
lookup tables implicitly and other times an explicit open is required.
If this isn't it, I have no other suggestions.

John Pierce

Re:Lookup fields on some systems don't work with Oracle ODBC


Quote
John Pierce wrote:
> I know this sounds obvious, but try explicitly opening the queries
> feeding the lookups (if you haven't done this already).  This is not a
> W2k issue, but I have found that sometimes lookups seem to open the
> lookup tables implicitly and other times an explicit open is required.
> If this isn't it, I have no other suggestions.

No, I'm explicitly opening all tables in TDatabase AfterConnect, which
I verified that runs and does open the tables. Besides, I have even
stranger problems:

One of the DBGrid columns is a lookup. In the first 25 rows, which all
have the same value in that lookup, the value DOES show. I scroll down
(it scrolls slowly on all systems except for mine, I think it's
related), and in the 26th row, which has a different value in that
lookup, the value does not show. I scroll up again (slowwwwlyyy), and
the first 25 rows are back here, and the value does not show.

Re:Lookup fields on some systems don't work with Oracle ODBC


I don't use ODBC, but there have been bugs in the various versions, of
which some are by MS and others by Oracle.  Try to get the latest
version for your Oracle release from each source, and then experiment to
see which works better for you.  Or you could switch to a third-party
Oracle component.

John Pierce

Re:Lookup fields on some systems don't work with Oracle ODBC


Re:Lookup fields on some systems don't work with Oracle ODBC


I'm trying to connect with the native driver instead of with ODBC, but I'm
having trouble. I downloaded and installed BDE 5.1.1. Oracle is 8.1.5,
Delphi is 5 enterprise. It always tells me "Vendor initialization failed"
whenever I try to connect.

Do I have to install the Oracle client on the client, or does the BDE do
everything?

I have a server DNS name, a port number (the default), and an Oracle service
name. I'm using
SERVER NAME=hostname.dnsdomain
NET PROTOCOL=TCP/IP (I also tried TNS)
Where do I specify the Oracle service name? Is it TDatabase.DatabaseName?

Quote
John Pierce wrote:
> I don't use ODBC, but there have been bugs in the various versions, of
> which some are by MS and others by Oracle.  Try to get the latest
> version for your Oracle release from each source, and then experiment to
> see which works better for you.  Or you could switch to a third-party
> Oracle component.

> John Pierce

Re:Lookup fields on some systems don't work with Oracle ODBC


Yes, more information at  link
http://www.borland.com/devsupport/sqllinks/bdesqlver.html

Quote
"Antonios Christofides" <A.Christofi...@hydro.ntua.gr> wrote in message

news:3A3F7AAE.41DB3C71@hydro.ntua.gr...
Quote
> I'm trying to connect with the native driver instead of with ODBC, but I'm
> having trouble. I downloaded and installed BDE 5.1.1. Oracle is 8.1.5,
> Delphi is 5 enterprise. It always tells me "Vendor initialization failed"
> whenever I try to connect.

> Do I have to install the Oracle client on the client, or does the BDE do
> everything?

> I have a server DNS name, a port number (the default), and an Oracle
service
> name. I'm using
> SERVER NAME=hostname.dnsdomain
> NET PROTOCOL=TCP/IP (I also tried TNS)
> Where do I specify the Oracle service name? Is it TDatabase.DatabaseName?

> John Pierce wrote:

> > I don't use ODBC, but there have been bugs in the various versions, of
> > which some are by MS and others by Oracle.  Try to get the latest
> > version for your Oracle release from each source, and then experiment to
> > see which works better for you.  Or you could switch to a third-party
> > Oracle component.

> > John Pierce

Re:Lookup fields on some systems don't work with Oracle ODBC


You must install the Oracle client, and configure an Oracle alias to
connect to your server.  Then test the connection with sql*plus.  When
it works, configure a BDE alias to the Oracle alias, using TNS.

JP

Other Threads