Mehmet

It is possible to create multiple instances of MapInfo from VB - one of these
will be the program that is causing the 'another user is editing' message -
VB SHOULD close down the MI instance when you halt your program but if there
is an open reference to it it won't. Look in your task manager for instances
of mapinfow.exe that are still running. In your code explicitly set the
MapInfo object to nothing at the point when you shut down the program - I
don't see a closedown so I presume this would be on the form unload - - this
releases MI and shuts down the exe.

In the folder where you have your MI tables, look for .TIN, .TMA files
associated with the MapInfo table that is causing the problem - especially if
you've had some crashes. These are the edit transactions that haven't been
resolved. In other words MapInfo still thinks its being edited.

Also - in VB - put a stop on each statement as you carry it out and see what
happens while developing - and put in some error traps, it helps work out
where you went wrong.

Paul Crisp

Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: Mehmet ALKAN [mailto:[EMAIL PROTECTED]
Sent: 16 January 2004 14:54
To: [EMAIL PROTECTED]
Subject: MI-L MIInfo-Vbasic Problem


Hello,


I connect via VisualBasic(VB) for MapInfo(MI). I wrote code (under below).

Dim mi As Object

Private Sub Command1_Click()

Set mi = CreateObject("MapInfo.application")

mi.Do "Open Table "" D:\dene1\1\c1 "" Interactive  Map From c1"
mi.Do "Create Menu ""MapperShortcut"" ID 17 as ""(-"" "

mi.Do "select* from c1 into selparsel"
mi.Do "Set Application Window " & Frame1.hWnd
mi.Do "Set Next Document Parent " & Frame1.hWnd & " Style 1"
mi.Do "Map From selparsel "
mi.Do " Set Map zoom entire layer selparsel"
mi.Do "set map layer ""selparsel"" editable on"

End Sub

Private Sub Command5_Click()
mi.Do "set map layer ""selparsel"" editable off"
End Sub

Private Sub Command2_Click()

mi.RunMenuCommand 1714

End Sub

Private Sub Command7_Click()
mi.Do "Commit table c1 "
End Sub

Private Sub Command8_Click()
mi.Do "select * from c1 where rowid =" & ""
mi.Eval (("tableinfo(c1,10)") & " into sel")
mi.Do "update sel1 set parselno =" + Text1.Text
mi.Do "Commit table c1"
mi.Do "run menu command 304"  

End Sub

I add a polygon and save not a enter attribute (with command_7 click). But
close and rerun program give an error.

"Cannot perform edit. Someone else is currently editing this table"


Besides; command8_click give an error. (I want to add polygon and attribute)

" found [] while  searching for [A string constant]" 

What can I do?



Thanks.
Mehmet ALKAN




********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to