| From: | Michael Meskes <meskes(at)postgresql(dot)org> |
|---|---|
| To: | Phil Moors <pmoors(at)phillips(dot)com> |
| Cc: | PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org> |
| Subject: | Re: [INTERFACES] No such connection NULL from ECPG |
| Date: | 1999-06-25 07:45:01 |
| Message-ID: | 19990625094501.A1535@gmx.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(dot)Meskes(at)gmx(dot)net | Use PostgreSQL!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rainer | 1999-06-25 08:08:41 | Structure of Data Information |
| Previous Message | Tom Lane | 1999-06-25 00:08:12 | Re: [INTERFACES] pgaccess and RH 6.0? |