pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed(no subject)
2+ messages / 2 participants
[nested] [flat]
* (no subject)
@ 2005-03-14 13:06 Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
2005-03-14 13:21 ` Re: Miroslav Šulc <miroslav.sulc@startnet.cz>
0 siblings, 1 reply; 2+ messages in thread
From: Mohsen Pahlevanzadeh @ 2005-03-14 13:06 UTC (permalink / raw)
To: pgsql-general
Dears,
When i wanna insert to my following code,I receive following error:
Insert into c(t) values('ccccccc'); --> It's my qurey.
Insert command failed!So i can't continue to insert in your table!
ERROR: pg_atoi: error in "ccccccc": can't parse "ccccccc"
my code :
pres = PQexec(pobj->connection2db, ins.c_str());
ins="";
if (!pres || PQresultStatus(pres) != PGRES_COMMAND_OK)
{
fprintf(stderr, "Insert command failed!So i can't continue to insert
in your table!\n");
cout << PQerrorMessage(pobj->connection2db);
pobj->exit_nicely(pobj->connection2db);
}
PQclear(pres);
When i print ins.c_str(),I see following statement:
Insert into z(e) values('10z');
It's true,But i recieve same error.
Please help me..............
--Mohsen
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re:
2005-03-14 13:06 (no subject) Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
@ 2005-03-14 13:21 ` Miroslav Šulc <miroslav.sulc@startnet.cz>
0 siblings, 0 replies; 2+ messages in thread
From: Miroslav Šulc @ 2005-03-14 13:21 UTC (permalink / raw)
To: mohsen@pahlevanzadeh.org; +Cc: pgsql-general
Mohsen Pahlevanzadeh wrote:
>Dears,
>When i wanna insert to my following code,I receive following error:
>Insert into c(t) values('ccccccc'); --> It's my qurey.
>Insert command failed!So i can't continue to insert in your table!
>ERROR: pg_atoi: error in "ccccccc": can't parse "ccccccc"
>
>
Usually atoi functions perform conversion from string to integer (if my
memory serves well). Maybe the problem is that you are trying to insert
string into numeric field.
>...
>
>
Miroslav
Attachments:
miroslav.sulc.vcf (text/x-vcard, 385B) download
begin:vcard
fn;quoted-printable:Miroslav =C5=A0ulc
n;quoted-printable:=C5=A0ulc;Miroslav
org:StartNet s.r.o.
adr;quoted-printable;quoted-printable:;;Vrchlick=C3=A9ho 161/5;Praha 5;;150 00;=C4=8Cesk=C3=A1 republika
email;internet:miroslav.sulc@startnet.cz
title:CEO
tel;work:+420 257 225 602
tel;cell:+420 603 711 413
x-mozilla-html:TRUE
url:http://www.startnet.cz
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-03-14 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-14 13:06 Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org>
2005-03-14 13:21 ` Re: Miroslav Šulc <miroslav.sulc@startnet.cz>
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