I'm using LedgerLink (LL) to access QuickBooks (QB) records. Basically I'm using it to add invoices (produced in my application) to QB. The first step is to query QB to see if the record already exists, using the following code:
This works just fine, but I've read that RecordCount is not the preferred method of doing something like this. Can someone provide me a more elegant way to do the same thing in SQL queries, or is this it?
Thanks in advance!
Roo
Delphi Rules!
Code:
function TQbInvForm.FindInvoice(RefNumber: string): boolean;
begin
LLInvData.Close;
LLInvData.QueryText.Clear;
LLInvData.QueryText.Add('SELECT * FROM Invoice WHERE RefNumber = '+ #39 + RefNumber + #39);
LLInvData.Open;
Result:= LLInvData.RecordCount = 1;
LLInvData.Close;
end; //FindInvoice
Thanks in advance!
Roo
Delphi Rules!