You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MapInfo-L
Hello, I have a program for processing a list of MapInfo tables. The program is written in C# and calls some commands from MapBasic. In each table of the list 2 fields added and filled according some rules. The program works against MapInfo 2019 or 2023. The program works valid in one computer and shows an error message on the other one. Below I give a scheme of the program. It has 2 input parameters: - fullPathToCatalog: path to a table with 2 fields:name of a table from the tables list and name of a field - tablesDir - path to directory containing the table that should be processed
public void Main() { miApp.Do($"Open Table \"{fullPathToCatalog}\" As Targets"); ProcessTables(); miApp.Do("Close All"); }
// Move to next target miApp.Do("Fetch Next From Targets"); } } private bool EnsureTableNotOpen(string tableName) { try { // Try to get list of open tables string tableList = miApp.Eval("NumTables()").ToString(); int tableCount = int.Parse(tableList); for (int i = 1; i <= tableCount; i++) { string openTableName = miApp.Eval($"TableInfo({i}, TAB_INFO_NAME)").ToString(); if (openTableName.Equals(tableName, StringComparison.OrdinalIgnoreCase)) { System.Threading.Thread.Sleep(500); // Brief pause return true; } } } catch { // If we can't check, assume it's not open or we can't close it } return false; }
---------------------------------- In procedure ProcessSingleTable where current table is edited on some table (say, tableX) I get a message: "Error processing table tableX. Cannot access file tableX.TMA. Cannot perform edit. Someone else currently editing this table" So I need recommendations how to organize this processing to avoid this error
Peter Horsbøll Møller
unread,
Oct 31, 2025, 8:39:21 AM (2 days ago) Oct 31
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mapi...@googlegroups.com
Hey Evgeny
How do you initiate the variable miApp?
Sometimes this fails because the path to MapInfo Pro hasn't been registered correctly on the computer.