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



If your COM-server is in-process - yes, if out-of-process (such as Word,
Excel) - no.

V contains ADO recordset that you can use in your COM library. Look MSDN for
ADO recordset properties and methods. You may try also

uses
ADOInt;

ADODataSet2.Recordset := v as _Recordset;

//------------------------------------------
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:433a4a95@xxxxxxxxxxxxxxxxxxxxxxxxx
> Thank you
>
> But if I use COM and take 'V' for parameter, then whether i can use your
> way or not?
> else how import the data from datasetrecord
> into 'V' in this case????
>
>
> "Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ
> :433a35c7$1@xxxxxxxxxxxxxxxxxxxxxxxxx
>> 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: Using WSH to populate a pivot cache with an ADO recordset
    ... I've tried this method and it works OK from WSH. ... However, in this case, I still need to be able to populate the pivot cache ... using an ADO recordset, because I've run previous statements on the ADO data ...
    (microsoft.public.excel.programming)
  • Re: Using WSH to populate a pivot cache with an ADO recordset
    ... cache using an ADO recordset, because I've run previous statements on ... the ADO data connection to create temporary tables which are then ... "keepITcool" wrote: ...
    (microsoft.public.excel.programming)
  • Re: how to assign a recordset of ado to a variant?
    ... V contains ADO recordset that you can use in your COM library. ... >> Regards, ... >>> And the 'variant' should contain all data in the recordset of ado. ...
    (borland.public.delphi.database.ado)
  • Re: COM Interoperability - Object type to Dataset
    ... The .OLE DB .NET Data Provider includes overloads to the ... OleDbDataAdapter.Fill method which take as input an ADO Recordset or Record ... > There is one function that has a return type variant, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: dhSQLite IFunction
    ... recordset when moving data from an ADO recordset to SQLite. ... wich you achieve using 50000 explicit Insert-Statements. ... And then compare these timings with the Insert-Performance, ...
    (microsoft.public.vb.general.discussion)