pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Access/Postgresql problem with text fields recognized as memo
3+ messages / 3 participants
[nested] [flat]

* Access/Postgresql problem with text fields recognized as memo
@ 2005-02-08 21:50  Justin Dahl <justind_lst@ussonet.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Justin Dahl @ 2005-02-08 21:50 UTC (permalink / raw)
  To: pgsql-odbc

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.


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.




  





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Access/Postgresql problem with text fields recognized as memo
@ 2005-02-09 16:54  Jeff Eckermann <jeff_eckermann@yahoo.com>
  parent: Justin Dahl <justind_lst@ussonet.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Jeff Eckermann @ 2005-02-09 16:54 UTC (permalink / raw)
  To: Justin Dahl <justind_lst@ussonet.net>; pgsql-odbc

--- Justin Dahl <justind_lst@ussonet.net> 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 
 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Access/Postgresql problem with text fields recognized as
@ 2005-02-09 18:23  laurie.burrow@powerconv.alstom.com
  0 siblings, 0 replies; 3+ messages in thread

From: laurie.burrow@powerconv.alstom.com @ 2005-02-09 18:23 UTC (permalink / raw)
  To: pgsql-odbc

Justin Dahl wrote:

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

I have experienced the same general issue using Access (several versions)
and Postgres 8. I believe this issue is resolved by ensuring that you have
defined a primary key for the table. A unique field is not sufficient. I
have found that setting the row versioning option does not help.

Access will identify rows using the primary key of a linked table provided
it does not map to a memo field. I generally use a serial type which works
fine.

Hope this helps
Laurie


:.________________
CONFIDENTIALITY : This  e-mail  and  any attachments are confidential and
may be privileged. If  you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person, use
it for any purpose or store or copy the information in any medium.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-02-09 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-08 21:50 Access/Postgresql problem with text fields recognized as memo Justin Dahl <justind_lst@ussonet.net>
2005-02-09 16:54 ` Jeff Eckermann <jeff_eckermann@yahoo.com>
2005-02-09 18:23 Re: Access/Postgresql problem with text fields recognized as laurie.burrow@powerconv.alstom.com

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