Hi Greg
 
I've wondered about that in the past.  Hmmmm, that's as maybe but the
code IS getting into the If statement(s), anyway, and doing the
necessary (otherwise my resultant dialogue wouldn't have any values in
it and I wouldn't get my traces on the screen).  The other 2 look-ups
are getting the correct values anyway.  Like you say, this doesn't tell
me why this one fails.
 
Thanks for the pointers on SelectionInfo()
 
Terry

________________________________

From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED] 
Sent: 24 November 2005 16:31
To: Terry McDonnell
Subject: RE: [MI-L] Table field vals not storing in variables -
sometimes



Terry, 

I'm not sure if this will help but when use the NOSELECT key word in an
SQL select you can't use SelectionInfo(SEL_INFO_NROWS) function to
determine the number of rows that have been retuned.  The
SelectionInfo() function returns info about the current selection, but
as you've used NOSELECT the last SQL isn't the current selection, if you
see what I mean?  For example, if you issue an SQL Select and then
another SQL select with NOSELECT, the first SQL select will be the
current selection, so SelectionInfo(SEL_INFO_NROWS) will return the
number of rows returned by the  first SQL and not the 2nd one.

I'm not saying this will sort you problem but just something to be aware
of as you're using SelectionInfo() as a test to see if the SQL select
has return something.  You could use TableInfo(0, TAB_INFO_NROWS) > 0 as
an alternative, as this will return the number of rows in the last table
opened, which would be your query. 

Greg Driver 

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to