Page 1 of 1

SQlRecCount and parameters

Posted: Tue 30 Mar 2021 17:54
by alienjohn
Hello,
I am using trial o IBDAC and try to make some simple test task as this one :

I have a TIBCQuery with a SQL text :
SELECT FullName, Phone, Address, Type FROM Contacts WHERE Type :ParType
Field “Type” has values 1 = Customer, 2 = Supplier, 3 = Contact ,so ParType gets values from 1-3. I display the records in a grid, so far OK.
I need to get RecordCount for type = 1 (customers) and the grid is showing record results from type =2 (Suppliers)
when the RecordCount is executed the grid is showing the result from type = 1 (Customers) .

Note that the SQlRecCount text is the same as above and property QueryRecordCount = True. Before I execute the
TIBCQuery.RecordCount I pass the parameter as 1 (Customers).

Is there something that I missing or do I need to create a new query for that, to pass a diffrent parameter?

Thank you,
John

Re: SQlRecCount and parameters

Posted: Fri 02 Apr 2021 08:41
by abak
Hello John,

Not sure that i understand you. But want to notice a missing in your sql (=) :

Code: Select all

.  WHERE Type =:ParType  

Re: SQlRecCount and parameters

Posted: Wed 07 Apr 2021 16:33
by oleg0k
Hello,
Unfortunately, the information you provided is insufficient for us to reproduce the issue.
Please send us an example that uses IBDAC and demonstrates the incorrect behavior, along with DDL scripts for creating and populating the database objects (or the backup file/database file).
Please send them to us through the form: https://devart.com/company/contactform.html

wbr, Oleg
Devart Team

Re: SQlRecCount and parameters

Posted: Wed 12 May 2021 22:25
by alienjohn
Thank you,

sorry for my delay some health problems.

Changed my code for the refresh question.

"But want to notice a missing in your sql (=) :" it was i mistyped of me.

Thanks again

Re: SQlRecCount and parameters

Posted: Fri 14 May 2021 10:42
by ViktorV
Hi John,

I’m glad that your issue is resolved and you can use all components of the software.
Please feel free to contact us anytime in case you have any questions in the future.

Best regards,
Viktor