No clue for embedded SQL

Started by Memphistoover 27 years ago1 messagesgeneral
Jump to latest
#1Memphisto
szoli@valerie.inf.elte.hu

Hi,

I'm sorry to say that I have no clue what happens within PgSQL when I try
to run my (still examplar) SQL programs. This time I just try to write a
little program that does _anything_ in the database, without success. I
know it's weird, but don't know why does not anything happen.
Here's a little app that supposed to create a table called perftest in
the DB 'szoli1'. It doesn't do that and does not reports errors, too.
Meanwhile with the same account I can do it manually.
What went wrong?

Thanks in advance

Sebesty���n Zolt���n

#include <stdio.h>
#include <sys/time.h>
#include <unistd.h>

exec sql include sqlca;

exec sql whenever sqlerror sqlprint;
exec sql whenever not found sqlprint;

int main()
{
exec sql begin declare section;
long i;
exec sql end declare section;

exec sql connect 'szoli1';

exec sql create table perftest(number int4, ascii varchar(16));
exit(0);
}

--------------------------------------------------------------------------------
Sebesty���n Zolt���n AKA Memphisto It all seems so stupid,
it makes me want to give up.
szoli@neumann.cs.elte.hu But why should I give up,
when it all seems so stupid?

MAKE INSTALL NOT WAR And please avoid Necrosoft Widows