On 8/13/06, Bill Thoen <[EMAIL PROTECTED]> wrote:
I tried rebuilding the databse with LATIN1 encoding and then I rebuilt the
entire cluster with that encoding, but that text field is still uneditable
and in the table structure it's listed with twice the length that it really
is. So I went back to the default UNICODE settings and reloaded the
database. This is strange because I can modify this field with no problems
if I use a FILEDSN and MapBasic, and I can also import it into MS Access and
everything is editable.
So I looked at the tab file and discovered that the 'name' field was marked
as 'readonly'. Just to see what would happen, I removed that, opened the
table and modified a few rows. It worked perfectly and updated the remote
PostgreSQL table as it should have. So if there's an encoding problem, it
doesn't appear to be much of a problem, but I am still curious why when
MapInfo opens this table via ODBC, it made this varchar(30) column readonly
and thinks it's 60 characters wide, especially in light of the fact that if
you remove the readonly flag, it doesn't cause any problems.
In any case, I'll only be accessing data via MapBasic and MS Access VBA.
Those methods seem to have no porblems, so as far as I'm concerned the
interactive method can go hang. But if anyone knows why varchar(n) fields
in PostgreSQL get marked as readonly when MapInfo links to them via ODBC,
I'd still like to know.
- Bill Thoen
The 30 char versus 60 char issue still sounds like encoding: I think
MapInfo is interpreting 2 byte encoding as 1 byte encoding. So a two
byte char type appears to MapInfo to be twice as wide as it actually
is. UTF8 is 1 byte (8 bit) encoding. Not sure what LATIN1 is. I think
UNICODE is 2 byte.
Are all fields in the TAB file readonly, or just the char field? I
have often seen that a primary (unique) key is required for an linked
ODBC table to be updateable. But I would think that would effect all
fields in the table.
Rich
--
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l