Using embedded SQL.

Поиск
Список
Период
Сортировка
От Robert J. Sprawls
Тема Using embedded SQL.
Дата
Msg-id Pine.LNX.4.20.0006031733050.9771-100000@tacdyn.com
обсуждение исходный текст
Ответы Compiling Error
Re: Using embedded SQL.
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: "carl garland"
Дата:
Сообщение: Problems with Large Databases
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Any monitor programs?