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