SQlRecCount and parameters

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alienjohn
Posts: 5
Joined: Tue 30 Mar 2021 16:01
Location: Greece

SQlRecCount and parameters

Post by alienjohn » Tue 30 Mar 2021 17:54

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

abak
Posts: 29
Joined: Sat 18 Oct 2014 18:42

Re: SQlRecCount and parameters

Post by abak » Fri 02 Apr 2021 08:41

Hello John,

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

Code: Select all

.  WHERE Type =:ParType  

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: SQlRecCount and parameters

Post by oleg0k » Wed 07 Apr 2021 16:33

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

alienjohn
Posts: 5
Joined: Tue 30 Mar 2021 16:01
Location: Greece

Re: SQlRecCount and parameters

Post by alienjohn » Wed 12 May 2021 22:25

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SQlRecCount and parameters

Post by ViktorV » Fri 14 May 2021 10:42

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

Post Reply