Re: Testing embedded SQL in C

From: "Reid Thompson" <Reid(dot)Thompson(at)ateb(dot)com>
To: "HT NB" <hbnt(at)hotmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Testing embedded SQL in C
Date: 2007-02-12 20:41:19
Message-ID: 1171312879.7032.13.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2007-02-12 at 15:16 -0500, HT NB wrote:
> Hi,
>
> How are you doing?
>
> First, I am testing if this email address is valid. It is the first
> time that I am using this account. I have a question about how to
> start write embedded SQL in C programming code. What are the basic
> requirements in the .pgc file to have the embedded SQL running.
>
> This is my coding which is aimed at testing if embedded SQL in C
> programming code is possible for my operating system Debian GNU/Linux.
>
> #include <stdio.h>
>
>
> int main ( )
> {
>
> EXEC SQL CONNECT TO database(at)sql(dot){ip address}.com :80;
>
> EXEC SQL INSERT INTO database (tab_number) VALUES (4);
> EXEC SQL SELECT * FROM database;
>
> return 1;
>
> }
>
>

see http://www.postgresql.org/docs/8.2/static/ecpg.html
see also
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/test/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Anton Melser 2007-02-12 21:16:17 Re: getting postgres to emulate mysql/sqlserver bit datatype
Previous Message Rajarshi Guha 2007-02-12 20:23:40 suggestions on improving a query