pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedNo such connection NULL from ECPG
3+ messages / 2 participants
[nested] [flat]
* No such connection NULL from ECPG
@ 1999-06-24 22:19 Phil Moors <pmoors@phillips.com>
0 siblings, 2 replies; 3+ messages in thread
From: Phil Moors @ 1999-06-24 22:19 UTC (permalink / raw)
To: pgsql-interfaces
My program compiles without errors. When the binary is run, I get:
No such connection NULL from line 384.
Line 384 is:
while(!sqlca.sqlcode)
{ blah blah blah }
My connect line is 374:
EXEC SQL CONNECT 'macs';
Ecpg expands this to:
{ ECPGconnect(__LINE__, NULL,"macs",NULL,NULL, 0);}
I found a post in the 'general' mailing list from 1998 that suggests that
the expansion should be:
{ ECPGconnect(__LINE__, "macs",NULL,NULL,NULL, 0);}
Am I barking up the wrong tree?
I recompiled and installed ecpg as root just to make sure I was not missing
anything and still get the same expansion.
TIA
Phil
--
pmoors@phillips.com | Speaking for himself only.
--------------------------------------------------------
What if there were no hypothetical situations? --Andrew Kohlsmith
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] No such connection NULL from ECPG
@ 1999-06-25 07:45 Michael Meskes <meskes@postgresql.org>
parent: Phil Moors <pmoors@phillips.com>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Meskes @ 1999-06-25 07:45 UTC (permalink / raw)
To: Phil Moors <pmoors@phillips.com>; +Cc: pgsql-interfaces
On Thu, Jun 24, 1999 at 06:19:39PM -0400, Phil Moors wrote:
> My program compiles without errors. When the binary is run, I get:
>
> No such connection NULL from line 384.
>
> ...
> My connect line is 374:
>
> EXEC SQL CONNECT 'macs';
The correct form is EXEC SQL CONNECT TO 'macs'; SQL92 wants to see the TO.
> Ecpg expands this to:
>
> { ECPGconnect(__LINE__, NULL,"macs",NULL,NULL, 0);}
Argh! This is one of the dreaded Oracle compatibility hacks. Oracle's
connect syntax is:
EXEC SQL CONNECT <username>
So ECPG thinks macs is the username. But there is another problem. It
shouldn't try to access connection NULL. The code says:
if (dbname == NULL && connection_name == NULL)
connection_name = "DEFAULT";
So why doesn't it display connection DEFAULT. I'll check that.
> { ECPGconnect(__LINE__, "macs",NULL,NULL,NULL, 0);}
It's line-number, db-name, user, password, connection_name, autocommit mode.
> Am I barking up the wrong tree?
No, there is a problem.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] No such connection NULL from ECPG
@ 1999-06-25 10:18 Michael Meskes <meskes@postgresql.org>
parent: Phil Moors <pmoors@phillips.com>
1 sibling, 0 replies; 3+ messages in thread
From: Michael Meskes @ 1999-06-25 10:18 UTC (permalink / raw)
To: pgsql-interfaces
On Thu, Jun 24, 1999 at 06:19:39PM -0400, Phil Moors wrote:
> No such connection NULL from line 384.
Okay, the error message is fixed. But the question remain if we allow Oracle
syntax or our own old syntax or only standard syntax.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-06-25 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-06-24 22:19 No such connection NULL from ECPG Phil Moors <pmoors@phillips.com>
1999-06-25 07:45 ` Michael Meskes <meskes@postgresql.org>
1999-06-25 10:18 ` Michael Meskes <meskes@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox