Re: Problems with ODBC
Posted in 1998
In article <70padv$jd8$1@news.xmission.com>, "Alejandro Alberola Arias" <alberola@bio.es> wrote: > > Hello, > > When I connect with INTERSOLV 3.01ODBC the > user name (alex) is been prefixed to the table name > (customers) and when I use that table, I receive > the following error message from the driver: > > "The specified table (alex.customers) is not in the database" > > Any idea ? > > Thanks in advance. > > Alejandro Alberola > alberola@bio.es > Hi, In the intersolv knowledgebase (http://www2.intersolv.com/sdirect/newdiscuss.nsf/85256274005ba45685256230006 e88 9d?OpenView or go there via the http://www.microfocus.com/support) you can find the following document: Topic When I try to open two tables in Access which are on the same server, but in different databases, I get the error message "[INTERSOLV][ODBC Informix Driver][Informix]: The specified table <tablename> is not in the database", but I know the table is in the database. Why do I get this error message? Resolution You will get this error message from Access whenever you try to open two or more tables from different databases on the Informix server. When you attach the tables in Access, the connection string returned by the ODBC driver is stored internally in Access to allow seamless connections whenever you try and open the table again through Access. One of the attributes in the connection string is the DATABASE= attribute (or in the short form, DB=), as shown in the below connection strings: DSN=Informix5;DB=test;UID=test;PWD=test DSN=Informix5;DATABASE=stores6;UID=uid;PWD=pwd Both of the above connection strings are equivalent, since ODBC allows for either the short or long form of the DATABASE attribute. Therefore, for shorter connection strings, the INTERSOLV drivers normally return the short form for this attribute as DB=. However, it turns out that Access does not like the short form for the DATABASE attribute when it tries to connect to two different databases, and when it attempts to open the second table, it tries to find the table in the database it opened, therefore causing the Informix error message to be returned. The solution to this problem is to add a line to your ODBC.INI file under the datasource you are using, as seen below: [Informix5-07] Driver=C:\\WIN31\\SYSTEM\\QEINF507.DLL Database=test HostName=InfServer LogonID=uid Service=sqlexec Description= CursorBehavior=0 Databases= YieldProc= EnableScrollableCursors=0 GetDBListFromInformix=1 WorkArounds=2048 <-------Add this line This WorkAround instructs the INTERSOLV driver to return the long form of the DATABASE attribute, and therefore allow Access to successfully open both attached tables. I'm not sure that the 3.01 version has this workaround implemented already, check the readme. If not you can download the latest version of the driver from the intersolv site. Hope this helps, Toffie -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own