.NET Framework Class Library
Database.GetListFromQueryCOM Method

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > .NET API > MwPDMApi Namespace > Database Class > Database Methods >

.NET Framework Class Library
Database.GetListFromQueryCOM Method

The behavior is the same as the GetListFromQuery method, but it is exposed to COM clients for use for example in vbscript.

Namespace: MwPDMApi
Assembly:  MwPDMApi (in MwPDMApi.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

Visual Basic

Public Function GetListFromQueryCOM ( _

query As String _
) As Object

C#

public Object GetListFromQueryCOM(

string query
)

Visual C++

public:

Object^ GetListFromQueryCOM(
String^ query
)

JavaScript

function getListFromQueryCOM(query);

Parameters

query

Type: System.String
The query to execute. It must return a single recordset

Return Value

A list of objects, one for each row returned by the query. A value can be retrieve with the GetValue method on the object passing the column name specified in the query

Remarks

Examples

 

Copy imageCopy Code

query = "SELECT " &  DBWDn & " as Directory," & DBWFn & " as FileName, COUNT(" & DBWFn & ") AS QTY" & " FROM " & DBWtn & " GROUP BY " &  DBWDn & "," & DBWFn

Dim list
list = app.Database().GetListFromQueryCOM(query)
For Each elemento In list
    fname = elemento.GetValue("FileName")
    dname = elemento.GetValue("Directory")
    fullname = dname & fname
    MsgBox( fullname )
Next

See Also

Database Class

Database Members

MwPDMApi Namespace

Database.GetListFromQuery(String)