Hi Terry, The problem may be that "stop" is a command in MapBasic and maybe parsed as a reserved word. However, I would normally expect this to cause a problem at compile time. Try changing it anyway and see what happens. I can't see anything else that is obviously wrong although you could be doing a lot of updates by places this in the SelChangedHandler. What is the run-time error you get? Conversion failure perhaps? Another thought is that you may be selecting a row from a browser that does not have an obj, which will make centroidx() and centroidy() fail. Finally, "stop.eastings" will contain the value of the current record in table "stop" and may not be the same as the one you update in the subsequent SQL.
Regards, Warren Vick Europa Technologies Ltd. http://www.europa-tech.com -----Original Message----- From: Terry McDonnell [mailto:[EMAIL PROTECTED] Sent: 09 June 2005 18:04 To: [email protected] Subject: MI-L What's wrong with this code? Can anyone see the problem with this code in my SelChangedHandler?: _______________________________________ note "Eastings = " + str$(stop.eastings) Update STOP Set Northings = CentroidY( OBJ), Eastings = CentroidX( OBJ), Last_Udate = CurDate() where RowID = gnRowID ' Change the N/E values to the new coords in the OBJ, after the move _______________________________________ I put the note in as a debug aid to a) satisfy myself that I was getting into the handler, and b) to confirm that Stop.Eastings exists. But at run-time I get an error on the Set.. command, to the effect that Eastings doesn't exist. But the note works. I quadruple-checked that the field IS actually called this, and that it's spelt right, and that the syntax of the command is as in Help. It doesn't object to Northings. Me flummoxed! 'ppreciate it Terry --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 16766
