Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Contributor
Posts: 15
Registered: ‎11-20-2009

Getting Group Query and Params via GetGroupSQLInfoEX

We had a customization that reads the GroupSQL via the GetGroupInfoSQL method - and it doesnt work properly with 8.1. I understand it has been deprecated and replaced by GetGroupInfoSQLEX.

 

Is there any information about the parameter collection that this method returns?

 

Right now i can see that it returns a collention that returns a parameter collection that i can retrieve as params(i).value. However it doesnt seem to have a name property that helps me tie it back to the params in the query itself.

 

So for example, the WHERE clause in the query indicates:

(ACCOUNT.C_MANAGEMENT_COMP=:ValueParam0) AND (ACCOUNT.CREATEDATE>Smiley Very HappyateTime0)

 

The parameter collection however comes back in the following order and doesnt line up with the WHERE clause;

(0) 1/1/2000

(1) Acme International

 

As you see there isnt a way to tie the parameter tags and their values together. I was hoping that each parameter would have a name that would reflect the actual name used in the Query, but it doesnt seem to have a .name property that i can use.

 

Any suggestions would be helpful. Thanks in advance.

Employee
Posts: 629
Registered: ‎04-24-2009

Re: Getting Group Query and Params via GetGroupSQLInfoEX

Hi,

 

The parameters have the following properties; note that some of them are specifically designed to be used by reporting:

 

CrystalName (The Crystal parameter name)
DataType (ADO data type)
DelphiName (The standard parameter name)
FieldName (The DB field)
FormulaForm (Crystal formula form for the parameter)
Kind (pkParameterField = 0 (standard parameter); pkCommandTable = 1 (treated as a Crystal CommandTable))
Operator (' = ', ' <= ', etc.)
Size (The size of the field)
TableName (The DB table name)
TypeCode (The .NET TypeCode for the Value)
Value (The parameter value)

 

You can use Application.BasicFunctions.GetRecordset(SQL, Parameters) to return a recordset for the group.

 

Thanks

 

Mike

Copper Contributor
Posts: 15
Registered: ‎11-20-2009

Re: Getting Group Query and Params via GetGroupSQLInfoEX

Thanks so much. You made my day!

Employee
Posts: 629
Registered: ‎04-24-2009

Re: Getting Group Query and Params via GetGroupSQLInfoEX

Glad to help!

 

Thanks

 

Mike