This method allows you to execute an AQL query on the multivalue server and get a structured array returned containing the results.


Namespace: rocketsoftware.MVSP
Assembly: RocketMVSP (in RocketMVSP.dll)

Syntax

Visual Basic (Declaration)
Public Sub ExecuteQuery( _ 
   ByVal queryCmd As String,  _ 
   ByVal queryFilepath As String,  _ 
   ByVal queryWith As String,  _ 
   ByVal querySortby As String,  _ 
   ByVal queryADIList As String,  _ 
   ByVal queryItemids As String,  _ 
   ByVal queryKeywords As String _ 
)
C#
public void ExecuteQuery(
   string queryCmd,
   string queryFilepath,
   string queryWith,
   string querySortby,
   string queryADIList,
   string queryItemids,
   string queryKeywords
)
C++
public:
 void ExecuteQuery(
   String queryCmd,
   String queryFilepath,
   String queryWith,
   String querySortby,
   String queryADIList,
   String queryItemids,
   String queryKeywords
) sealed 
J#
public void ExecuteQuery(
   string queryCmd,
   string queryFilepath,
   string queryWith,
   string querySortby,
   string queryADIList,
   string queryItemids,
   string queryKeywords
)
JScript
public  function ExecuteQuery(
   queryCmd : String,
   queryFilepath : String,
   queryWith : String,
   querySortby : String,
   queryADIList : String,
   queryItemids : String,
   queryKeywords : String
)

Parameters

queryCmd
This is the command that you wish to execute. Valid values are QUERY, LIST or SORT
queryFilepath
This is the full path to the file that you wish to query
queryWith
Optional with clause
querySortby
Optional by clause
queryADIList
List of the dictionary items that you wish to retrieve data for
queryItemids
Optional list is item ids
queryKeywords
Optional list of additional AQL keywords to use multivalued (USING supported only)

Remarks



Example connects and executes a query to retrieve contactname and city for all contactnames starting with Robert and sorted by city from the CUSTOMERS file.

 Copy Code
 Dim returncode as boolean
 Dim mvsp as new rocketsoftware.MVSP.Pick
 Dim mvspf as new rocketsoftware.MVSP.Functions
 Dim txt as string 
 returncode = mvsp.Connect("localhost",9000,"dm","")
 If returncode = True then
    returncode = mvsp.Logto("MVDEMO","")
    If returncode = True then
       mvsp.ExecuteQuery("QUERY", "CUSTOMERS", "WITH CONTACTNAME = ""ROBERT]""", "BY CITY", "CONTACTNAME CITY", "","USING DICT SQLDEMO,CUSTOMERS,")
       While mvsp.MVResultSetNext = True
          txt = mvsp.MVResultSetGetCurrentRow
          ListBox1.Items.Add(mvspf.Extract(txt, 1))
          ListBox2.Items.Add(mvspf.Extract(txt, 2))
       End While
    End if
 End if
 returncode = mvsp.CloseConnection()
 
Requires MVSP Server 1.5.0 or later, otherwise an exception is generated

See Also