Обсуждение: Newbie: Access to PostgreSQL from Windows 3.11

Поиск
Список
Период
Сортировка

Newbie: Access to PostgreSQL from Windows 3.11

От
Christof Klaiber
Дата:
Hello all,

I just set up PostgreSQL on a Linux-Box at work. We have several clients
running Windows for Workgroups 3.11 from which I want to connect to the
Database-Server. I thought I could do this using SQL-Pass-Through -
instructions in MS Access but I was not able to find an ODBC-driver which
runs under WfW 3.11. The psqlODBC from www.insightdist.com needs Windwos
95/98 or NT. And I did not find one, that would connect to a Linux Box on
www.openlinksw.com.

Can anyone tell me how to connect to PostgreSQL from WfW 3.11? Can the
JDBC-driver be a solution? I fear installing a beast like Netscape on an
old 386-Wintel, just to have a JavaVM. So which application are you using.

I hope this is not a FAQ (so I have the certain feeling that it is), but I
was not able to find any answer to this. Maybe someone can point me to an
answer. I am confused enough from installing the TCP/IP-Stack on the
Wintel-Boxes, since I use a Mac running LinuxPPC at home.

Thanks in advance,
Christof Klaiber


ecpg: use of #defines

От
James Thompson
Дата:

Hello,



In my exec sql begin declare section i have items like

 char uid_result[31];

which I tried to replace last night with
  char uid_result[UID_LEN];

  and I placed #define UID_LEN 31 in a .h file

  I changed my #include with a exec sql include to include the .h file

  The parser didn't like the char uid_result[UID_LEN] line

  I'm pretty sure I understand the mechanics of this, cpp hasn't run and
  UID_LEN is an invalid value.

Is there a workaround?  Other than hard coding the 31

Thanks

->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
James Thompson    138 Cardwell Hall  Manhattan, Ks   66506    785-532-0561
Kansas State University                          Department of Mathematics
->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<



Re: [INTERFACES] ecpg: use of #defines

От
Michael Meskes
Дата:
On Sat, Feb 20, 1999 at 10:22:09AM -0600, James Thompson wrote:
> In my exec sql begin declare section i have items like
>
>  char uid_result[31];
>
> which I tried to replace last night with
>   char uid_result[UID_LEN];
>
>   and I placed #define UID_LEN 31 in a .h file

#define is only parsed by cpp not by ecpg.

>   I changed my #include with a exec sql include to include the .h file
>
>   The parser didn't like the char uid_result[UID_LEN] line
>
>   I'm pretty sure I understand the mechanics of this, cpp hasn't run and
>   UID_LEN is an invalid value.

Try 'exec sql define UID_LEN 31;'

> Is there a workaround?  Other than hard coding the 31

No need to work around this as the functionality is already there. Please
see test1.pgc for an example. Yes, I know I should document all this. :-)

Note, that using the exec sql define command is sufficient. You do not need
a #define anymore since ecpg will make the replacement.

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!