Re: [GENERAL] connection problem with ecpg (SOLVED)

From: Lincoln Spiteri <lincoln(dot)spiteri(at)st(dot)com>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] connection problem with ecpg (SOLVED)
Date: 1998-11-19 14:57:52
Message-ID: 365431F0.D46C55C@st.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello again,

Couldn't wait and did what should have done before opening my mouth!

It just happens that there might be a bug in ECPG. When looking at the
code genereted for the line:

exec sql CONNECT 'my_db';

the output after runing my source through the preprocessor was:

no_auto_trans = 0;
ECPGconnect(__LINE__, NULL, "my_db", NULL,NULL);
#line 96 "my_source.c"

This wont't work. Manually editing the generated code fixes the problem
and everything works ok. The code should be:

no_auto_trans = 0;
ECPGconnect(__LINE__, "my_db", NULL, NULL,NULL);
#line 96 "my_source.c

Regards

Lincoln Spiteri
STMicroelectronics (Malta)

lincoln(dot)spiteri(at)st(dot)com wrote:
>
> Hi,
>
> I have been using EPCG since 6.3.2 with no problems. I am extending some
> code written in my 6.3.2 days which is now targeting a newly built 6.4.
> I now have a problem connecting to my database.
>
> The command:
>
>
> give out the following error during runtime:
>
> connect: could not open database NULL.
>
> Has the syntaxt changed in anyway or could it be a setup problem.
>
> Any help would be greatly aprreciated.
>
> Regards
>
> Lincoln Spiteri
> (STMicroelectronics, Malta)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 1998-11-19 15:05:22 Re: [INTERFACES] Large Objects
Previous Message Lincoln Spiteri 1998-11-19 14:34:22 connection problem with ecpg