Hello,

I have a question.

I connect via Vbasic(VB) to MapInfo (MI). First one connect Access and read
a parcelno. And then,
this parcelno to equalize from MapInfo parcelno. As a Result, I draw graphic
data on a frame object. (The code under below)

I show a blue code row, there is no problem up to 30 data number(30 parcel
number). But if the too much 30,
VB give a    "Expiression too complex" at a blue code row.

What can I do?
Thanks.
Mehmet ALKAN

Private Sub Command7_Click()
Dim A, c(250), T As String

cnn.Open "TEZ_VT"

With cmd2
    .CommandType = adCmdText
    .CommandText = " SELECT Parcel.ParcelNo " & _
                   " FROM Parcel " & _

    Set .ActiveConnection = cnn
End With

With rst2
    .CursorType = adOpenStatic
    .LockType = adLockOptimistic
    .Open cmd2
End With

A = rst2.RecordCount
rst2.MoveFirst

For i = 1 To A
    Text1.Text = rst2.Fields("ParcelNo")
    c(i) = Text1.Text
    rst2.MoveNext
Next i

Set mi = CreateObject("MapInfo.application")
mi.do "Open Table "" D:\VB\uyg "" Interactive  Map From uyg"
mi.runmenucommand 1702
mi.do "Create Menu ""MapperShortcut"" ID 17 as ""(-"" "
T = ""

For i = 1 To A
T = T + Chr$(34) & c(i) & Chr$(34) & ","
Next i

T = Left(T, Len(T) - 1) 


mi.do "select* from uyg where TASINMAZNO = any(" & T & ") into selparsel" 
("Expiression too complex")


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"

End Sub

Reply via email to