Sann

You need to retrieve more information into VB to make this work OR pass more
to MapInfo - the statement Selectioninfo(Sel_info_TableName) will have no
meaning for VB. 

What you are doing is a ssembling strings in VB and passing them to MapInfo
for execution - so you need the correct MapBasic syntax.
(Selectioninfo is a MapBasic statement and Sel_info_TableName is a MapBasic
constant).

Try

mapinfo.do " Dim K as string "

'if you have MapBasic.BAS in your project you can do this - 
mapinfo.do " k = Selectioninfo(" & Sel_info_TableName & ")"

'Otherwise
mapinfo.do " k = Selectioninfo(1)"

'To retrieve the result
myval = mapinfo.eval("k")

'For housekeeping then remove your variable in MapInfo
mapinfo.do " UnDim K"

You CAN do all this in a single statement
eg
myval = mapinfo.eval("Selectioninfo(1)")


HTH

Paul Crisp

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


-----Original Message-----
From: sann [mailto:[EMAIL PROTECTED]]
Sent: 07 September 2002 09:51
To: [EMAIL PROTECTED]
Subject: MI-L Re: Mapinfo With VB



   helo,
   lister

       i have few question. I want to open mapinfo
from
  VB as OLE , i done it but how i do some query from
then VB as i want to Know how many table open and add
the Table name into combobox .

  i give the command for selected TableName
  mapinfo.do " Dim K as string "
mapinfo.do " k = " & Selectioninfo(Sel_info_TableName)

but error massege are coming

     Thanks for any help
        
         Sann
      



   


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 2894


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

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