pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedECPG examples
5+ messages / 5 participants
[nested] [flat]
* ECPG examples
@ 1999-01-03 03:01 Christian Valverde <valval@porta.net>
2003-06-27 15:18 ` Re: ECPG examples Jim Parker <hopeye@cfl.rr.com>
2003-06-27 17:03 ` Re: ECPG examples Darko Prenosil <darko.prenosil@finteh.hr>
2003-06-27 17:50 ` Re: ECPG examples Michael Meskes <meskes@postgresql.org>
2003-06-27 22:48 ` Re: ECPG examples Henk Jan Barendregt <henkjan@barendregt.xs4all.nl>
0 siblings, 4 replies; 5+ messages in thread
From: Christian Valverde @ 1999-01-03 03:01 UTC (permalink / raw)
To: pgsql-interfaces
im trying to build some objects to interact with QT dialog i just maid .
please could anypne point me a site where to see examples on ECPG
im actually interested in examples of reciving data fron databases . i already
send data to pg but cant receive data form pg .
--
nver let the bed bug bite
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ECPG examples
1999-01-03 03:01 ECPG examples Christian Valverde <valval@porta.net>
@ 2003-06-27 15:18 ` Jim Parker <hopeye@cfl.rr.com>
3 siblings, 0 replies; 5+ messages in thread
From: Jim Parker @ 2003-06-27 15:18 UTC (permalink / raw)
To: valval@porta.net; +Cc: pgsql-interfaces
Here are some example files I wrote with the help of the book:
Neil Matthew, and Richard Stones; "Profesional Linux Programming";
Wrox Press Ltd., Birmingham, UK; 2000
cheers,
Jim Parker
BTW I appologize to the list for the number and length of the files.
If someone could add them to a tutorial or other documentation, that
would be great. The ECPG docs are limited at best :-(
On 1999.01.02 22:01 Christian Valverde wrote:
> im trying to build some objects to interact with QT dialog i just maid
> .
> please could anypne point me a site where to see examples on ECPG
> im actually interested in examples of reciving data fron databases . i
> already
> send data to pg but cant receive data form pg .
> --
> nver let the bed bug bite
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
Attachments:
[text/x-makefile] Makefile (901B, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/2-Makefile)
download | inline:
#
# Makefile for GtkCAD database module
#
all:
# The compiler of choice
CC = gcc
# Installation directory
INSTDIR = .
# Include file(s):
INCLUDE = -I../include
PG_INC = -I/usr/include/postgresql
GTK_INC = -I/usr/include/gtk-1.2
# Options for development
CFLAGS = -g -Wall -ansi `gtk-config --cflags`
# Options for release
# CFLAGS = -O2 -Wall -ansi `gtk-config --cflags`
# GTK+ library
GTKLIB = `gtk-config --libs`
# LIBRARIES
LIBS = -lecpg -lpq `gtk-config --libs`
# Test object files
#
OBJS = test_db_ecpg.o \
test_createdb_ecpg.o \
test_get_ecpg.o \
test_edit_ecpg.o \
test_insert_ecpg.o
# Suffix rule to make a .c file from a .pgc file
%.c: %.pgc
ecpg -t $(PG_INC) -o $@ $<
# Suffix rule to make a object file from a .c file
%.o: %.c
$(CC) -c $(PG_INC) $(CFLAGS) -o $@ $<
# Make the executable
test_db: $(OBJS)
$(CC) $(LIBS) -o test_db $(OBJS)
clean:
rm ./*.o
rm test_db
[text/x-c] test.h (2.4K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/3-test.h)
download | inline:
/* GtkCAD - A free modular CAD/CAE/CAM software
*
* Copyright (C) 2000-2002 H. James Parker <hopeye@cfl.rr.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later
* version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* --- test.h ---
*
* Change Log:
*
* 13 Mar 02 - Created file;
*/
/*
* --- Include files
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
/*
* --- Define Statements
*/
#define SUCCESS 0
#define FAILURE 1
#define SMALL 1.0
#define NORMAL 2.0
#define BIG 3.0
/*
* --- Data structures
*/
typedef struct {
int color;
int size;
int part;
int group;
int layer;
} typCurrent;
typedef struct {
int id;
float x;
float y;
float z;
int saved;
int modified;
int deleted;
} typPoint;
/*
* --- Function prototypes
*/
int db_get_points (void);
int db_process_point_query (void);
int db_find_point (int point_id);
int db_add_point (typPoint *point);
int db_edit_point (typPoint *point);
int db_delete_point (int point_id);
int db_connect_ecpg (char *database);
int db_cleanup (void);
int db_createdb (char *dbname);
int db_save (void);
int db_selectdb (void);
GSList *insert_point (GSList *list, gint id , gfloat x, gfloat y, gfloat z,
int saved, int modified, int deleted);
/*
* --- Internal Global Variables
*/
extern typPoint point;
extern typCurrent currentType;
extern GSList *points;
extern GSList *pnode;
extern typPoint *point_t;
extern char server[50];
extern char database[25];
extern char connection[25];
extern char login[25];
extern char password[25];
[application/octet-stream] test_createdb_ecpg.pgc (2.3K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/4-test_createdb_ecpg.pgc)
download
[application/octet-stream] test_db_ecpg.pgc (5.8K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/5-test_db_ecpg.pgc)
download
[application/octet-stream] test_edit_ecpg.pgc (2.3K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/6-test_edit_ecpg.pgc)
download
[application/octet-stream] test_get_ecpg.pgc (2.6K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/7-test_get_ecpg.pgc)
download
[application/octet-stream] test_insert_ecpg.pgc (2.4K, ../../20030627111835.C354@shamrock.cfl.rr.com%5C000/8-test_insert_ecpg.pgc)
download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ECPG examples
1999-01-03 03:01 ECPG examples Christian Valverde <valval@porta.net>
@ 2003-06-27 17:03 ` Darko Prenosil <darko.prenosil@finteh.hr>
3 siblings, 0 replies; 5+ messages in thread
From: Darko Prenosil @ 2003-06-27 17:03 UTC (permalink / raw)
To: pgsql-interfaces
On Sunday 03 January 1999 04:01, Christian Valverde wrote:
> im trying to build some objects to interact with QT dialog i just maid .
> please could anypne point me a site where to see examples on ECPG
> im actually interested in examples of reciving data fron databases . i
> already send data to pg but cant receive data form pg .
Which version of QT do You use ?
There are database objects like QSqlQuery QSqlField that can simplify your
tasks. When I first tried it, it was version 2.5. There is also QSqlDriver
that directly support PostgreSQL. Not shore why You must use ECPG when QT has
DB classes and objects.
Regards !
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ECPG examples
1999-01-03 03:01 ECPG examples Christian Valverde <valval@porta.net>
@ 2003-06-27 17:50 ` Michael Meskes <meskes@postgresql.org>
3 siblings, 0 replies; 5+ messages in thread
From: Michael Meskes @ 2003-06-27 17:50 UTC (permalink / raw)
To: Christian Valverde <valval@porta.net>; +Cc: pgsql-interfaces
On Sat, Jan 02, 1999 at 10:01:35PM -0500, Christian Valverde wrote:
> im trying to build some objects to interact with QT dialog i just maid .
> please could anypne point me a site where to see examples on ECPG
> im actually interested in examples of reciving data fron databases . i already
There is a test/ dir inside ecpg source tree.
Michaelö
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ECPG examples
1999-01-03 03:01 ECPG examples Christian Valverde <valval@porta.net>
@ 2003-06-27 22:48 ` Henk Jan Barendregt <henkjan@barendregt.xs4all.nl>
3 siblings, 0 replies; 5+ messages in thread
From: Henk Jan Barendregt @ 2003-06-27 22:48 UTC (permalink / raw)
To: pgsql-interfaces
Christian Valverde wrote:
> im trying to build some objects to interact with QT dialog i just maid .
> please could anypne point me a site where to see examples on ECPG
> im actually interested in examples of reciving data fron databases . i already
> send data to pg but cant receive data form pg .
You can find a e-copy of the oracle proc/c++ programmers guide here
http://download-uk.oracle.com/docs/cd/A64702_01/doc/index.htm
You can convert it to postgresql programs with some minor changes
Regards,
Henk Jan Barendregt
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2003-06-27 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-03 03:01 ECPG examples Christian Valverde <valval@porta.net>
2003-06-27 15:18 ` Jim Parker <hopeye@cfl.rr.com>
2003-06-27 17:03 ` Darko Prenosil <darko.prenosil@finteh.hr>
2003-06-27 17:50 ` Michael Meskes <meskes@postgresql.org>
2003-06-27 22:48 ` Henk Jan Barendregt <henkjan@barendregt.xs4all.nl>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox