Re: Embeded "C" question
Posted in 1997
>From: olded@ix.netcom.com (Ed Schaefer)
>Date: 3 Jun 1997 06:17:31 GMT
>X-Informix-List-Id: <news.38665>
>
>Given: ESQL/C 6.02 and Online 7.14 under AIX.
Thanks.
>Let's say I have a database called tgg on a remote server. On a client
>running an embedded "C" program I have an online instance with the
>database tgl. Can I not (with the proper settings on INFORMIXSERVER and
>DBPATH) do this:
>
>1) Open the local database tgl.
>2) select * into ... from tgg:tem where ...
Well, you have to tell the engine where to look. If you don't specify the
server, then I don't think it uses DBPATH inside a SELECT, only during the
connection phase (CONNECT or DATABASE statements). So, I'd expect you to
have to write:
SELECT * INTO ... FROM tgg@remote:tem WHERE ...
Or, do:
CREATE SYNONYM tem FOR tgg@remote:tem;
Now you can use SELECT * INTO ... FROM tem WHERE ...
>Of course, the tgg database is on the remote server. I seem to be
>having a problem connecting to the remote database. I want to do this
>case I'm planning on doing something like this:
>
>insert into tem
> select * from tgg:tem>
>As always, any help is greatly appreciated,
There again, creating a local synonym with the same name a a local table
won't work -- you'd have to create a synonym called remote_tem or
something.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>