cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How execute a query in VB Script

MRenoud
Super Contributor

Hello,

First, I wish you an happy new year 2024.

Question 1 : when executing a query, it's possible to save the result in a set by using keep

Example :
Select [Application] into @Apli
Keep @Appli

Is it possible to list all saved set ?

Question 2:

We want to execute a query in VBScript.

If query implementation = "Select", we can use VBScript Code below

set oQuery = mgobjObject.GetRoot.GetObjectFromId("QueryName")
sQuery = oQuery.Getprop("_Select")
set cOjb = mgobjObject.GetRoot.GetSelection(sQuery)


But if query implementation = "macro", how can we execute the query in VBScript ?

I thank you for your help

1 Reply

KennethB
MEGA
MEGA

Hi MRenoud,

Question2 (Macro query from VBScript)

There are numerous examples of this in the code.

This is an example from the Value View - Max.Update Tool macro

Set queries = oRoot.GetCollection("~nriwOLWsQXRS[Queries without mandatory parameters]")

Hopefully this helps

Kenneth