Using embedded SQL.

From: "Robert J(dot) Sprawls" <sprawlsr(at)worldnet(dot)att(dot)net>
To: pgsql-general <pgsql-general(at)hub(dot)org>
Subject: Using embedded SQL.
Date: 2000-06-03 22:37:32
Message-ID: Pine.LNX.4.20.0006031733050.9771-100000@tacdyn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
I'm trying to learn embedded SQL in C. However, it's not working
and reading the documentation is not answering my question(s). Here is my
code:

#include <stdlib.h>
#include <stdio.h>
exec sql include sqlca;

int main( int argc, char *argv[] ) {

exec sql whenever sqlerror sqlprint;
exec sql connect tootle;
exit( 0 );
exec sql disconnect sprawlsr;
}

And here is what I get back:

sql error Could not connect to database <DEFAULT> in line 25.

What am I doing wrong? Yes, the database does exist as tootle.

Robert

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Giles Lean 2000-06-03 23:08:28 Re: Re: Industrial-Strength Logging
Previous Message The Hermit Hacker 2000-06-03 20:43:36 Re: [GENERAL] PostgreSQL v7.0.1 Released