Subject Re: [ib-support] Connecting to db using C
Author William L. Thomson Jr.
On Wed, 2002-07-17 at 02:25, Paul Reeves wrote:
> William L. Thomson Jr. wrote:
> > Sorry for not having looked in the docs for an answer, but based on the
> > comment above, by using a servername:/path/to/db.gdb should be able to
> > use isc_attach();
> >
> > Although it appears to be trying to connect to the localhost. No good.
>
> Well, I tried compiling api3.c on an NT box and connecting to an
> employee database on a remote Linux box. Depressingly (for you), it all
> worked as expected. I passed servername:/path/to/employee.gdb as an
> argument to the program. Connection was established and data retrieved
> without problem.

Great. I was able to get past my localhost issues by using dpb's, which
I assume I will need either way to pass along a user name and password.
Not to mention other things I may to have set later in my app.

> Can you use ISQL from the client PC to connect to the database on the
> remote server? I suspect you have a configuration issue somewhere, but
> other than that, I'm afraid I'm out of bright ideas.

No I get the same error with that as in my C app.
Statement failed, SQLCODE = -923

connection rejected by remote interface

With the exception of SQL code, my C app also returns the connection
rejected thing.

Now from the same machine I can get things like IBAccess, and my Java
apps to connect to the db server fine.

First off, I am sure it's obvious, but I can't remember where I can find
out info on the sql code(s).

Secondly is there a env var or something I need to have set? I think it
to be strange that I have issues with isql, and my C app, but other
things work fine?

IBAccess I know does depend on and use the same libgds.so. So there must
be something I am missing or not doing.

Sorry if it is in front of my face or on my head. I have problems at
times with the obvious. Like the whole First keyword thing, and my
recent problem with the JDBC driver. :)

Give me tough problem and I will solve it, but sometimes 2+2=5 for me :)
Not really but just an example. :)

--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone 707.766.9509
Fax 707.766.8989
http://www.obsidian-studios.com