Re: how to assign a recordset of ado to a variant?



var
v: OleVariant;
begin
...
v := ADODataSet1.Recordset;
end;

or
v := ADODataSet1.Recordset as IDispatch;

But you can not pass recordset between processes.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)


"zhangsn" <zhangsn98@xxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:4339f0d3@xxxxxxxxxxxxxxxxxxxxxxxxx
> Hi
> I want to pass a 'variant' to other program on another machine.
> And the 'variant' should contain all data in the recordset of ado.
> I see the sourcecode of delphi6. But I did not understand, and i
> could not use clientdataset and provider in this .
> anyone have the sample change the recordset to a variant and on the
> another
> program change the variant to the dataset.
> rgds
>
>


.



Relevant Pages

  • Re: Problem with the output of Split
    ... to the recordset and made them both advarcharjust to test this. ... The Array and Split statements here seem equivalent except when I try ... Dim varFieldNames As Variant ...
    (microsoft.public.vb.general.discussion)
  • Re: Concatenate problem
    ... > Function sCostDesc(lcindex As Variant) As Variant ... Rs As Recordset ... The first column is an ID ... the second is a description keyword. ...
    (microsoft.public.excel.programming)
  • RE: import html forms from outlook to access
    ... Dim rstExchange As Recordset, rstUsers As Recordset ... Dim UserName As Variant, UserCompany As Variant ...
    (microsoft.public.access.externaldata)
  • RE: Listbox Sideways
    ... True, but by looping through the fields returned by a recordSet object, ... the array used by the call back function. ... Public Function FillDateBox(ctlField As Control, varID As Variant, varRow As ... Dim varRetval As Variant ...
    (microsoft.public.access.modulesdaovba)
  • Re: how to assign a recordset of ado to a variant?
    ... else how import the data from datasetrecord ... >> And the 'variant' should contain all data in the recordset of ado. ... >> anyone have the sample change the recordset to a variant and on the ...
    (borland.public.delphi.database.ado)