Subject Re: [IBO] Correct way to use TIB_Cursor
Author peter@cyionics.com
Re my previous question

After a few attempts I came up with the following

I set the sql property to


select * from product where BARCODE = :BARCODE

and used the following code

With Product_IB_Cursor do
begin
Close;
Prepare;
ParamByName('BARCODE').AsString := Barcode;
Open; // run query
end;


It does work, please can someone confirm that this is the recommended way to do this type of thing before I move onto edits.

Rgds

Peter
----- Original Message -----
From: peter@...
To: IBObjects@yahoogroups.com
Sent: Tuesday, August 12, 2003 4:39 PM
Subject: [IBO] Correct way to use TIB_Cursor


I now have various tables and I would like in code to search for a particular item in a product table using a supplied barcode.

Thus the sql

select * from product WHERE BARCODE = 0000003000

does work.

BARCODE will be a variable, I know I need to use params and prepare, but I am a little overwhelmed by the number of properties in a TIB_Cursor.

Can anybody walk me through the correct configuration of a TIB_Cursor to perform the above.

Thanks in advance.

Rgds

Peter

[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT




___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]