I have had similar problems, though not identical.  Using an Access data
base to convert fixed width ASCII files to MDB tables so MI could read them.
What happened was an update operation would shift the data for each record
after a cretin point in the update process.  What I had to do was delete the
table in MI from the last time it was used, it could not refresh itself
after a new access table was created via Make Table query.  Although I can
not begin to explain what happened, anyone who has used Access tables in MI
knows that there is an added index field, and I suspected that was the
culprit, even though I used another unique index field to join on. Below is
pasted a fix from the workspace that deletes and re-registers the access
table and runs all the column updates every time the work space is opened.
This may provide you with a work around in your MBX.

This part registers the Access table and backs up the Parcels table:

 Register Table "X:\MAPINFO\Eq Imports\Names_Values.mdb"  Type ACCESS Table
"MapInfo_Update" Into "X:\MAPINFO\Eq Imports\MapInfo_Update.TAB"
Open Table "Z:\MAPINFO\UNIONTWP\Parcels" As Parcels Interactive
Commit Table Parcels As "Z:\MAPINFO\Eq
Imports\Parcels_Backup_Before_Update.TAB" TYPE NATIVE Charset
"WindowsLatin1"
Open Table "Z:\MAPINFO\UNIONTWP\MapInfo_Update" As MapInfo_Update
Interactive

Then an update col section, and finally, the registered access table is
delegated in the last line of the workspace so the next time the workspace
is run, it may register the table anew:

Drop Table MapInfo_Update

I have not had the problem reoccur since using this method.



William "Woody" Woodruff
Zoning Administrator
Charter Township of Union, Isabella County, Michigan
-84.80947000 43.61095100
2010 S Lincoln Rd, Mt. Pleasant, MI  48858
(989) 772 4600 EXT 41
Visit our web site at http://www.geocities.com/ctuzoning/index.htm


-----Original Message-----
From: Dominic Lowe [mailto:[EMAIL PROTECTED]
Sent: April 07, 2004 05:44
To: [EMAIL PROTECTED]
Subject: MI-L Indexing problems Access/Mapinfo


Hi all,

Has anyone encountered the following problem?

Using Mapbasic I'm trying to add and populate a couple of X,Y columns to a
table that is stored in Access.
The size of this table may vary, but on a large (ish) table (> 20,000 rows)
I often get this error

"Cannot create an index on a currently edited table. Unable to create
index."

All I am doing is this:

        Alter Table "MyTable" ( add XCoord Float,YCoord Float )
        Commit Table MyTable

        Update MyTable Set XCoord = CentroidX(obj), YCoord = CentroidY(obj)
        Commit Table MyTable


The strange things about this error are:

It doesn't always happen.
Nobody else or any other process is accessing the Access table.
Performing the same operation manually works fine.
Cutting and pasting the code into the mapbasic window works fine.

This problem only occurs in a compiled mbx, and even then only sometimes..

Any thoughts? I have tried committing and not committing the table at
various points but the error still occurs. I've tried fastedit on/off to no
avail.


Cheers

Dominic



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 11317

Reply via email to