Hi All,
 
Some questions about integrated mapping ie: Update and FileOpenDlg
 
1. Update - Below is the code that i had written in VB. However when run, error dialog pops up saying "Cannot perform edit. Someone else is currently editing the table"
Just a note: s_table refers to a valid table name
###############################################################################
Public Sub ChangeItem(item As Integer)
Dim i As Integer
mi.Do "Dim o_sector as object"
mi.Do "Select * from s_table where Col1=" & item & " into Selection"
For i = 1 To mi.Eval("SelectionInfo(" & SEL_INFO_NROWS & ")")
    mi.Do "Fetch rec " & i & " from selection"
    mi.Do "o_sector = selection.obj"
    mi.Do "Alter Object o_sector Info " & OBJ_INFO_BRUSH & ", makebrush(2, 0, 0)"
    mi.Do "Alter Object o_sector Info " & OBJ_INFO_PEN & ", Makepen(1, 2, 0)"
    mi.Do "update selection set Obj = o_sector where Rowid = " & i
Next
End Sub
###############################################################################
 
2. FileOpenDlg
This question is pertaining to this keywork usage in MapBasic.
Understand that if we use this command, the file open dialog will appear. However, in this case we are able to select only 1 file. Read somewhere in the forum that we can use getopenfilename (Declare function getopenfilename ... ). Wondering, if anyone has successfully did it and able to post the codes here. Tried a few times doing it, after always run into some errors.
 
 
If anyone has any answers, please feel free to email your thoughts.
Thank you very much


Search from any Web page with powerful protection. Get the FREE Windows Live Toolbar Today! Try it now!
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to