Thread: what is with this #deleted thing?
Hello, I do not know what is it with this deleted thing ?!? After downloading the latest postgresql (postgresql 7.1) and the latest odbc driver on two totaly newly installed machines. I narrowed down the problem to the following: 1- created a table as follows: create table try (try_id serial, try_text char(20)); 2- linked the database from access 97. 3- made the oid of access as primary index in access. 4- opend the table in datasheet view. 4- started inserting data in table try in the field try_text 5- every thing worked fine until I try to insert to fields in try_text with the same content as one before it. example you can insert a, aa, aaa, aaaa, aaaaa, etc ... in try_text without any problem, then if you try to insert a field that was inserted before again (example aa) you get the deleted thing. 6- if I close the datasheet view and open it again, the deleted goes away and the record appear as normal. 7- if you update a field to become similar to one already inserted the problem does not occur. It only occurs when you insert a new record. example I already have a, aa, aaa, aaaa, etc ... in the field try_text if I change aaaa to aa it does not make a problem. I think I figured things out on earlier versions, I do not know why this occured again. I give up I've spent my whole day trying to figure out any further then that but to no use. Any one can help? regards, Rony. _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Hello, I believe its to do with the row being modified after insertion. What seems to happen is that it inserts the row then tries to fetch it back using the primary key, oid which was NULL at insert time, obviously this changes though. I then tries to select the row based on the only none NULL thing it knows about it, try_text in this case. Since this is repeated it gets more than one row back and gets confused (the #DELETED). Access 2K seems much better at dealing with this and you're table works fine for me (Access 2K doesn't seem quite so smart on one of my tables however as it returns a duplicate of the first row rather than the correct row (maybe because I have a text field which is intepreted as memo by default)). Also there can be problems with Access reporting that someone else has altered you're data. Enabling Row versioning seems to help this. If you do use row versioning then you will also need to have this in the backend: <<xid2i4.sql>> I believe there are Docs/FAQs on http://techdocs.postgresql.org - Stuart > -----Original Message----- > From: Rony Khoury [SMTP:rkrk@hotmail.com] > Sent: Wednesday, May 16, 2001 5:03 PM > To: pgsql-odbc@postgresql.org > Subject: what is with this #deleted thing? > > > Hello, > > I do not know what is it with this deleted thing ?!? > > After downloading the latest postgresql (postgresql 7.1) and the latest > odbc > driver on two totaly newly installed machines. I narrowed down the problem > > to the following: > > 1- created a table as follows: > create table try (try_id serial, try_text char(20)); > > 2- linked the database from access 97. > > 3- made the oid of access as primary index in access. > > 4- opend the table in datasheet view. > > 4- started inserting data in table try in the field try_text > > 5- every thing worked fine until I try to insert to fields in try_text > with > the same content as one before it. > > example you can insert a, aa, aaa, aaaa, aaaaa, etc ... in try_text > without > any problem, then if you try to insert a field that was inserted before > again (example aa) you get the deleted thing. > > 6- if I close the datasheet view and open it again, the deleted goes away > and the record appear as normal. > > 7- if you update a field to become similar to one already inserted the > problem does not occur. It only occurs when you insert a new record. > > example I already have a, aa, aaa, aaaa, etc ... in the field try_text if > I > change aaaa to aa it does not make a problem. > > I think I figured things out on earlier versions, I do not know why this > occured again. > > I give up I've spent my whole day trying to figure out any further then > that > but to no use. > > Any one can help? > > regards, > Rony. > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. >
Attachment
Are there any special gotcha's with using cursors with ODBC to postgresql?
From
"Peter Wilkinson"
Date:
We are porting code from running over odbc into Oracle, where O's drivers seemed a bit shakey and we had to switch to Merant drivers. Are there any special gotcha's with using cursors with ODBC to postgresql? Thanks Peter Wilkinson www.innate.co.uk