pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feednot permanent insert into stud values('myname')
5+ messages / 4 participants
[nested] [flat]
* not permanent insert into stud values('myname')
@ 1998-07-29 07:15 rony khoury <ron@cyberia.net.lb>
1998-07-29 09:08 ` Re: [INTERFACES] not permanent insert into stud values('myname') Hannu Krosing <hannu@trust.ee>
1998-07-29 11:56 ` Re: [NOVICE] not permanent insert into stud values('myname') James Olin Oden <joden@lee.k12.nc.us>
0 siblings, 2 replies; 5+ messages in thread
From: rony khoury @ 1998-07-29 07:15 UTC (permalink / raw)
To: pgsql-novice@postgreSQL.org <pgsql-novice@postgreSQL.org>; pgsql-interfaces
Hello ,
following is a part of my code , can any body tell me why it works fine
,
but 'myname' does not remain permanent in the table although I'm loging
in as postgres
and see 'myname' in the result when I run the program ?
thanks ,
Rony .
--------------------- C code -------------------
res = PQexec(conn,"insert into stud values('myname')");
PQclear(res);
res = PQexec(conn,"select * from stud");
for (i=0;i<PQntuples(res);i++) {
printf("\n answer is %s",PQgetvalue(res,i,0));
---------------------- output -----------------------
#a.out
answer is rony
answer is myname
#
----------------------------------------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [INTERFACES] not permanent insert into stud values('myname')
1998-07-29 07:15 not permanent insert into stud values('myname') rony khoury <ron@cyberia.net.lb>
@ 1998-07-29 09:08 ` Hannu Krosing <hannu@trust.ee>
1998-07-29 09:33 ` Re: [INTERFACES] not permanent insert into stud values('myname') rony khoury <rkhoury@apotres.edu.lb>
1 sibling, 1 reply; 5+ messages in thread
From: Hannu Krosing @ 1998-07-29 09:08 UTC (permalink / raw)
To: ron@cyberia.net.lb; +Cc: pgsql-novice@postgreSQL.org <pgsql-novice@postgreSQL.org>; pgsql-interfaces
rony khoury wrote:
>
>
>
> Hello ,
>
> following is a part of my code , can any body tell me why it works
> fine ,
It should work fine ;)
> but 'myname' does not remain permanent in the table although I'm
> loging in as postgres
> and see 'myname' in the result when I run the program ?
You probably start a transaction, but never commit it (in some other
part of your code)
Hannu
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [INTERFACES] not permanent insert into stud values('myname')
1998-07-29 07:15 not permanent insert into stud values('myname') rony khoury <ron@cyberia.net.lb>
1998-07-29 09:08 ` Re: [INTERFACES] not permanent insert into stud values('myname') Hannu Krosing <hannu@trust.ee>
@ 1998-07-29 09:33 ` rony khoury <rkhoury@apotres.edu.lb>
1998-07-29 09:44 ` Re: [NOVICE] Re: [INTERFACES] not permanent insert into stud values('myname') rony khoury <rkhoury@apotres.edu.lb>
0 siblings, 1 reply; 5+ messages in thread
From: rony khoury @ 1998-07-29 09:33 UTC (permalink / raw)
To: Hannu Krosing <hannu@trust.ee>; +Cc: ron@cyberia.net.lb, "pgsql-novice@postgreSQL.org" <pgsql-novice@postgreSQL.org>; pgsql-interfaces
Hannu Krosing wrote:
> rony khoury wrote:
> >
> >
> >
> > Hello ,
> >
> > following is a part of my code , can any body tell me why it works
> > fine ,
>
> It should work fine ;)
>
> > but 'myname' does not remain permanent in the table although I'm
> > loging in as postgres
> > and see 'myname' in the result when I run the program ?
>
> You probably start a transaction, but never commit it (in some other
> part of your code)
>
> Hannu
no it does not work fine or else I wouldn't have asked .
What do you mean I should commit it in some other part of my code ? how
to do that ?
rony .
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [NOVICE] Re: [INTERFACES] not permanent insert into stud values('myname')
1998-07-29 07:15 not permanent insert into stud values('myname') rony khoury <ron@cyberia.net.lb>
1998-07-29 09:08 ` Re: [INTERFACES] not permanent insert into stud values('myname') Hannu Krosing <hannu@trust.ee>
1998-07-29 09:33 ` Re: [INTERFACES] not permanent insert into stud values('myname') rony khoury <rkhoury@apotres.edu.lb>
@ 1998-07-29 09:44 ` rony khoury <rkhoury@apotres.edu.lb>
0 siblings, 0 replies; 5+ messages in thread
From: rony khoury @ 1998-07-29 09:44 UTC (permalink / raw)
To: Hannu Krosing <hannu@trust.ee>; ron@cyberia.net.lb, "pgsql-novice@postgreSQL.org" <pgsql-novice@postgreSQL.org>; pgsql-interfaces
rony khoury wrote:
> Hannu Krosing wrote:
>
> > rony khoury wrote:
> > >
> > >
> > >
> > > Hello ,
> > >
> > > following is a part of my code , can any body tell me why it works
> > > fine ,
> >
> > It should work fine ;)
> >
> > > but 'myname' does not remain permanent in the table although I'm
> > > loging in as postgres
> > > and see 'myname' in the result when I run the program ?
> >
> > You probably start a transaction, but never commit it (in some other
> > part of your code)
> >
> > Hannu
>
> no it does not work fine or else I wouldn't have asked .
> What do you mean I should commit it in some other part of my code ? how
> to do that ?
>
> rony .
ok it works fine for me now , I just needed to add an
PQexec(conn,"END");
now that it works , it was a silly question , sorry for the trouble .
thanks again ,
Rony .
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [NOVICE] not permanent insert into stud values('myname')
1998-07-29 07:15 not permanent insert into stud values('myname') rony khoury <ron@cyberia.net.lb>
@ 1998-07-29 11:56 ` James Olin Oden <joden@lee.k12.nc.us>
1 sibling, 0 replies; 5+ messages in thread
From: James Olin Oden @ 1998-07-29 11:56 UTC (permalink / raw)
To: ron@cyberia.net.lb; +Cc: pgsql-novice@postgreSQL.org <pgsql-novice@postgreSQL.org>; pgsql-interfaces
> res = PQexec(conn,"insert into stud values('myname')");
>
Don't you still need to include the SQL EOL character, that is a
semicolon at the end of your querystring?
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~1998-07-29 11:56 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-07-29 07:15 not permanent insert into stud values('myname') rony khoury <ron@cyberia.net.lb>
1998-07-29 09:08 ` Hannu Krosing <hannu@trust.ee>
1998-07-29 09:33 ` rony khoury <rkhoury@apotres.edu.lb>
1998-07-29 09:44 ` rony khoury <rkhoury@apotres.edu.lb>
1998-07-29 11:56 ` James Olin Oden <joden@lee.k12.nc.us>
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