Subscribe to this thread
Home - General / All posts - using SQL functions in VBscript
menicoll19 post(s)
#20-May-25 17:43

Is there a recommended technique in VBscript for using a function which exists in Manifold 9 SQL, but not in the scripting API ?

For example I have the latitudes and longitudes of two points in a VBscript, and would like to use the SQL DistanceEarth function to get the distance between them. (There appears to be no equivalent function in the scripting API.)

Dimitri


7,557 post(s)
#20-May-25 19:06

Use the Database.Run method to run an SQL query within your script, and use the SQL functions you want in that query.

menicoll19 post(s)
#20-May-25 21:47

But if my lats and lons are in variables in the vbscript, not in a table, then what?

Do I have to create a temporary table, put my data in, then run the SQL query on the temp table?

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.