[Q] ODBC to Informix via Access97
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration
I have an Access97 DB with Linked Informix tables via an Intersolv ODBC
driver. When I process the following sql statement I get an error -201.
However through the Informix SQL Editor 3.0 it works.
SQL:
SELECT Count(BillingID) AS RecFound From Billings WHERE SomeKeyID=64
Error returned:
[OpenLink][ODBC][Informix Server]A syntax error has occurred. (-201 (#-201)
When I run this query in the Informix SQL Editor 3.0 it executes fine.
Server:
NT Server 4.0 sp3 running Informix Dynamic Server TNT 7.30.TC3.1
Workstation:
NT WS 4.0 sp4
ODBC Driver:
OpenLink Lite for Informix7 (32Bit) v 3.15.1015
OpenLink ODBC setup program v1.15.1014
Any ideas why this happens? Thanks for your feedback.
Steve
Hi,
do you have run this sql-stmt as a "pass through" query?
Bye
Andy
Steven Wong schrieb in Nachricht <7lquba$akj$1@news.interlog.com>...
>I have an Access97 DB with Linked Informix tables via an Intersolv
ODBC
>driver. When I process the following sql statement I get an
error -201.
>However through the Informix SQL Editor 3.0 it works.
>
>
>SQL:
>SELECT Count(BillingID) AS RecFound From Billings WHERE SomeKeyID=64>
>Error returned:
>[OpenLink][ODBC][Informix Server]A syntax error has occurred. (-201
(#-201)
>
>When I run this query in the Informix SQL Editor 3.0 it executes
fine.
>
>Server:
>NT Server 4.0 sp3 running Informix Dynamic Server TNT 7.30.TC3.1
>
>Workstation:
>NT WS 4.0 sp4
>
>ODBC Driver:
>OpenLink Lite for Informix7 (32Bit) v 3.15.1015
>OpenLink ODBC setup program v1.15.1014
>
>Any ideas why this happens? Thanks for your feedback.
>
>Steve
>
>
>
>
>
>
>
Hi
The syntax you require is
SELECT Count(distinct BillingID) AS RecFound From Billings WHERESomeKeyID=64
This should work. I tested the original syntax in Dbaccess and found
that that didn;t work either. By adding the distinct, I was able to get
a count plus a new column name
In article <7lquba$akj$1@news.interlog.com>,
"Steven Wong" <stevew@interlog.com> wrote:
> I have an Access97 DB with Linked Informix tables via an Intersolv
ODBC
> driver. When I process the following sql statement I get an error -
201.
> However through the Informix SQL Editor 3.0 it works.
>
> SQL:
> SELECT Count(BillingID) AS RecFound From Billings WHERE SomeKeyID=64>
> Error returned:
> [OpenLink][ODBC][Informix Server]A syntax error has occurred. (-201
(#-201)
>
> When I run this query in the Informix SQL Editor 3.0 it executes fine.
>
> Server:
> NT Server 4.0 sp3 running Informix Dynamic Server TNT 7.30.TC3.1
>
> Workstation:
> NT WS 4.0 sp4
>
> ODBC Driver:
> OpenLink Lite for Informix7 (32Bit) v 3.15.1015
> OpenLink ODBC setup program v1.15.1014
>
> Any ideas why this happens? Thanks for your feedback.
>
> Steve
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.