Home Texas Home

CTQuery::AddMethod

CTQuery::AddMethod adds a method call to a query object. This enables the one query object to house more than one method call.
HRESULT AddMethod(
   BSTR Name,
   LONG InterfaceVersion,
   BSTR Parameters
);
	

Parameters

Name Name of the method, for readability we not using method ids, the name will be matched by the API.
InterfaceVersion The expect parameter format.
Parameters A native print of a TVariable structure, use the CTVariable::ToString method.

Return Values

S_OK for success, windows error code otherwise.

Remarks

Example Use


TComAPI.CTVariable parameter = new TComAPI.CTVariableClass();
parameter.get_Element("UserName").AString = Request.QueryString["UserName"];
TComAPI.CTQuery query = new TComAPI.CTQueryClass();
query.AddMethod("Get Entity Details",1,parameter.get_ToString(0));
query.Execute((long)Session["SessionID"],0,0);
parameter.SetStructure(query.get_Results("Get Entity Details"),0);
if(parameter.Type == 12)//return structure, not error, treat as good
   Label1.Text = parameter.get_ToString(7);
else Label1.Text = "Get Entity Details Error - " + parameter.get_ToString(0);

Also See

Execute

Copyright © 2007, Ekky Software Pty Ltd.