Board index » delphi » How I can convert a VB ADO Recordset to Delphi Ado Recordset

How I can convert a VB ADO Recordset to Delphi Ado Recordset

How I can convert a VB ADO Recordset to Delphi Ado Recordset.

I have a DLL (COm) write in VB, and It has a function that return a
Recordset, my Delphi application recive that recordset, but i cant place in
a dataset or Delphi recordset. Delphi recive the recorset in Recordset15
class

 

Re:How I can convert a VB ADO Recordset to Delphi Ado Recordset


Assuming "fRecordset" is your VB recordset the folling code should
work:

    with ADODataSet do
    begin
      Close;
      CommandType := cmdFile;
      LockType := ltBatchOptimistic;
      CommandText :='';
      RecordSet := ADOInt._Recordset(fRecordset);
      if not(BOF and EOF) then First;
    end;
    fRecordset := nil;

Dennis Passmore
Ultimate Software, Inc

"If you cannot conceive the idea you
 will never achieve the desired results"

Other Threads