Terry,

One fix is to set a variable with the value of csr1.Desc and then update
the table from that variable.

Try this:

Dim sDesc as string

        If SelectionInfo( SEL_INFO_NROWS) > 0 then      
                browse * from csr1
                Fetch First From csr1           'Not usually necessary,
but good form
                sDesc = csr1.Desc                       'assign the
value to a variable
                Update csrFacMastPlus
                        Set FT_Desc = sDesc     'update (all the
records?) the table with the variable
<--------------------------!!!!!!!!!!!!!!!
        End If

Cheers,

John Hollingsworth 
GIS Manager - Outdoor IT 
Clear Channel Outdoor 
w) 919-789-4100x4169 
c) 919-332-1869 
f) 919-789-4190 
NAC: 8FGHR NZ2WZ 
LEGAL NOTICE: Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this e-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
e-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Terry
McDonnell
Sent: Wednesday, November 16, 2005 11:37 AM
To: [EMAIL PROTECTED]
Subject: [Mapinfo-l] Mapinfo playing hard-to-get with me

Hi Listers
 
Consider the following code:
_____________________________
Select * from FacMast
        Where RowID = lnRowID   
Insert into csrFacMastPlus
        Select * from Selection
Commit Table csrFacMastPlus 
Alter Table csrFacMastPlus ( Add        Zone_Desc       Char( 40),
                                                FT_Desc Char( 35),
                                                ZG_Desc Char( 50))
Commit Table csrFacMastPlus 

If SelectionInfo( SEL_INFO_NROWS) > 0 then ' then found the correct row
        lnFacCode       = FacMast.Fac_Code
        lnZone          = FacMast.Zone
        lcCatchZG       = FacMast.CatchZG
        Select Desc from FacDesc
                where FacDesc.Fac_Code = lnFacCode 
                into csr1 NoSelect
        If SelectionInfo( SEL_INFO_NROWS) > 0 then      
                browse * from csr1
                Update csrFacMastPlus
                        Set FT_Desc = csr1.Desc
<--------------------------!!!!!!!!!!!!!!!
        End If
        ...
End If
_________________________________

When it gets to the line marked with the arrow I get the error "variable
or field csr1.Desc not defined"
This is despite the fact that:
1)  It wouldn't get to that line if the SelectionInfo() failed
2)  The Browse shows a column "Desc", and the browse window heading is
"crs1"

I've tried it with Selection.csr1 - same error only "Selection.Desc"
I suspected I didn't need the second commit statement, so it had been
ommitted but the error message them prompted me to put it in.

This is all part of my daily "firefighting" with this language, rather
than progressing, and I've run out of permutations/ideas.
Can anybody tell me what the problem is?

'ppreciate it

Terry McDonnell

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

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

Reply via email to