No, that's not the case. In MapBasic, you can use custom functions in 
'update' statements. In fact, this is a little known trick for rapidly 
updating tables rather than using the slower 'Do While...Loop' technique.

You might need to add the table name to the variable (e.g.  
Corner=strpcorner(stable2.location)), but that's just a stab in the dark.  
Check your spelling too -- 'location' may actually be 'loaction' in the
table, or something like that.

- Bill Thoen

On Mon, 26 Apr 2004, Jacques Paris wrote:

> My interpretation is that the expression used to update a column must be
> written with the MapBasic "vocabulary". I deduce that from the fact that
> "update" as many other functions can be run from the MapBasic window that
> does not support any "external" calls, i.e. calls to custom functions that
> are not part of the MB set and must be supplied by the user, and the MB
> window does not allow that.
> 
> Jacques Paris
> e-mail  [EMAIL PROTECTED]
> MapBasic-MapInfo support  http://www.paris-pc-gis.com
> 
> 
> -----Original Message-----
> From: Cummings, Mike [mailto:[EMAIL PROTECTED]
> Sent: 26-Apr-04 18:14
> To: Mapinfo-L
> Subject: MI-L mapbasic Update table with custom function
> 
> I tried to compile this code:
> 
> Update "stable2" Set MTRS = Left$(bm,1)+Twn+Rge+right$("0"+sec,2),
> Corner=strpcorner(location)
> 
> (Where MTRS, BM, TWN, RGE, SEC, corner & Location are fields in stable2
> and strpcorner is a custom function)
> 
> and I get this error message: Subroute Argument location not defined.
> 
> Why doesn't this work?  Shouldn't Mapbasic recognize that location is a
> field name?


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

Reply via email to