Hello, I think MB does not like your use of "AC.Phone_nbr" in the update statement. Simply dim a string variable, assign AC.Phone_nbr and then update using the variable name. An alias, as suggested by another lister, is not necessary here because you know the table and field name an compile time.
Regards, Warren Vick Europa Technologies Ltd. http://www.europa-tech.com Tel: +44 (0)20 8398 3955 x201 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 19:51 To: [EMAIL PROTECTED] Subject: MI-L Map Basic Runtime Error Hello, All Keeping in mind that I am New to MapBasic. I am trying to update an existing table from an new table (Called AC) where conditions exist in a column called "ACTION" in the new table. I have written the following program which compiles ok but when I run it I get the following error. [Variable or field Ac.phone_nbr not defined](on line 13) What am I doing wrong? Include "mapbasic.def" Open Table "EXISTING" Browse * from EXISTING Open Table "AC" Browse * from AC Fetch First From AC Dim i as integer i=0 Do While Not EOT(AC) If AC.Action="D" Then Update Existing Set Phone_nbr=AC.Phone_nbr End If Fetch Next from AC i=i+1 Loop ___________________________________________________________ Fidelity Communications Webmail - http://webmail.fidnet.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: 14411 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 14535
