niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
(unknown)
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
Author Message
Mohsen Pahlevanzadeh
*nix forums beginner


Joined: 14 Mar 2005
Posts: 23

PostPosted: Mon Mar 14, 2005 1:06 pm    Post subject: (unknown) Reply with quote

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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Back to top
Miroslav Šulc
*nix forums beginner


Joined: 05 Mar 2005
Posts: 9

PostPosted: Mon Mar 14, 2005 1:06 pm    Post subject: Re: Reply with quote

Mohsen Pahlevanzadeh wrote:

Quote:
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.

Quote:
...


Miroslav
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [2 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 8:17 am | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Unknown in header problem -SOLVED- Light Speed Postfix 0 Thu Jul 03, 2008 10:40 am
No new posts Writing a function that changes an unknown-type numeric v... pozz C 8 Wed Jul 19, 2006 5:23 pm
No new posts delivery temporarily suspended: unknown mail transport error Ramprasad Postfix 2 Wed Jul 19, 2006 2:42 pm
No new posts 2.6-S1 Parsing Config File: Unknown authentication scheme... Covington, Chris Squid 1 Tue Jul 18, 2006 2:21 pm
No new posts How to use ParseTuple with unknown number of args? ondekoza@gmail.com python 2 Tue Jul 18, 2006 9:29 am

Refinance | Bankruptcy | Credit Cards | Debt Consolidation | Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1100s ][ Queries: 16 (0.0333s) ][ GZIP on - Debug on ]