From: | "Nisha Srinivasan" <nisha(at)arch(dot)sel(dot)sony(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | error on INSERT - connection is read only |
Date: | 2001-05-14 19:31:24 |
Message-ID: | IMECIOAJKHNEDBJNAIDDGELOCEAA.nisha@arch.sel.sony.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
l see that a lot of people have the same problem and have posted questions
but I couldn't find an answer on the web.
I have Postgresql 6.5.3 running on Debian Linux.
And I use the iODBC driver manager 2.50.3 to make the ODBC calls.
Am not able to insert data into Postgres tables across ODBC.
I can do it using psql though.
odbc.ini has an entry saying readonly = no.
Also from the C++ program, I set the attribute of connection object as
writable explicitly.
If I ping the the connection object it says it's a writable connection.
And immediately i have a
connection.prepareStatement()
call that does an INSERT.
When this line is executed I get an error saying
"Connection is readonly, only select statements are allowed."
This error msg comes WITHOUT the [ODBC] tag.
Again when I catch{} the exception, I ping the connection object.
It's still a writable connection.
I should also mention that I use FreeODBC++ wrapper.
But I've searched through their source code and such an error message is not
defined in .h or .cpp files
I have tried to connect using the postgres superuser as well.
I have also tried to change my 'pg_hba.conf' file to allow connection as
trust for all.
This table has a primary key and permisions GRANTed to public for all
operations.
Apprecitate your help.
Thanx,
Nisha
Attachment | Content-Type | Size |
---|---|---|
winmail.dat | application/ms-tnef | 2.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-05-14 19:36:56 | Re: 7.2 items |
Previous Message | Thomas Swan | 2001-05-14 19:08:42 | Re: 7.2 items |