X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 93C048BA011 for ; Wed, 9 Feb 2005 16:54:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 16934-03 for ; Wed, 9 Feb 2005 16:54:29 +0000 (GMT) Received: from web20824.mail.yahoo.com (web20824.mail.yahoo.com [216.136.227.140]) by svr1.postgresql.org (Postfix) with SMTP id 22A528BA022 for ; Wed, 9 Feb 2005 16:54:28 +0000 (GMT) Received: (qmail 87793 invoked by uid 60001); 9 Feb 2005 16:54:27 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=CRDKvATLjIE9PaupXZo5lWOm4cEZv7/MD+7hGvGyuX4zVH/aNcVWV+yvV+yQERbOD+CtSgI+oNWRyFjdd+1icK/5zTF4kV83gsYT8mseWbLp4fS2ptxOBImtf0B8WHvmDRP86FOiVYq5ezE5Lm9tF0bwZWRXooioyDOaGhQU4Qg= ; Message-ID: <20050209165427.87791.qmail@web20824.mail.yahoo.com> Received: from [24.248.12.141] by web20824.mail.yahoo.com via HTTP; Wed, 09 Feb 2005 08:54:26 PST Date: Wed, 9 Feb 2005 08:54:26 -0800 (PST) From: Jeff Eckermann Subject: Re: Access/Postgresql problem with text fields recognized as memo To: Justin Dahl , pgsql-odbc@postgresql.org In-Reply-To: <4209342B.7090607@ussonet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.384 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200502/44 X-Sequence-Number: 4934 --- Justin Dahl wrote: > I've ran into this problem before and then abandoned > it out of > frustration, I'm coming back to it again. > > Using Access 2000 > Postgresql 7.3.4 > ODBC driver 7.03.02.00 on WinXP > > All tables I create have a unique index called "id" > that is of type > "serial". > Setting "Row Versioning" in odbc driver does not > make any difference. > > If a table is created with 3 columns > > id (serial) > field1 (varchar(255)) > field2 (text) > > This table is linked into an access file. > > If data is typed in at the table view of the file. > > Scenario 1: > Only a value is filled in for field1. > > The information is inserted normally and > everything is happy and good. > > Scenario 2: > Information is filled in for both field1 and > field2. > > The information is inserted normally and > everyting is happy and good. > > Scenario 3: > Only a value is filled in for field2. > > The information is inserted normally, but all > fields will display > #Deleted across them appearing to the user to have > failed. My understanding (admittedly limited) is that, after making an insert, Access will attempt to fetch the record back again, in order to verify that the insert worked as expected. Not knowing the primary key value (because it is an autonumber id), Access uses the known column values to identify the record that needs to be fetched back. Since Access cannot compare Memo values with each other, the action fails where only a Memo value is available. This will also be fragile where a field1 value is supplied, unless you are enforcing uniqueness on that field. My workaround for this problem was to fetch the primary key value at the time of data input, i.e. have the BeforeInsert event trigger code that, if the primary key is unassigned, will run a "select nextval()" on the appropriate sequence, and assign the returned value to the primary key field. > > > Scenario 3 is what is bothering me the most. I have > done quite a bit of > testing with this and this only occurs in > conjunction with fields > recognized as type "memo" by access. > Please keep in mine that I have a unique index field > called "id". The > same thing occurs wheather "Row Versioning" is > turned on or off on the > driver. > > I lean towards this being a MSAcess issue, can > anyone give any input on > this and how i could correct it? Let me know if more > info is needed. > > > > > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the > unregister command > (send "unregister YourEmailAddressHere" to > majordomo@postgresql.org) > __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com