🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.ado-net
3 messages
3 total messages Started by Saravanan Wed, 11 Oct 2006 08:09
How to connect TDataset to ADO.Net DataTable
#36
Author: Saravanan
Date: Wed, 11 Oct 2006 08:09
9 lines
1224 bytes

I have an application that I've ported to VCL.NET and I have used "WinForm Controls Import Wizard" to import a winform control to VCL.Net. The imported control has a property DataSource, for which I want to connect to VCL.Net TDataset(TTable, TQuery).

I know that TADONETConnector component Borland.Vcl.AdoNetDB
which can be used to make a ADO.NET datatable look like a dataset, but I want the other way.

Thanks & Rgds,
R.Saravanan
Re: How to connect TDataset to ADO.Net DataTable
#37
Author: Bob Swart
Date: Fri, 13 Oct 2006 05:57
26 lines
2171 bytes
Hi Saravanan,

> I have an application that I've ported to VCL.NET and I have used "WinForm Controls Import Wizard" to import a winform control to VCL.Net. The imported control has a property DataSource, for which I want to connect to VCL.Net TDataset(TTable, TQuery).

Note that the .NET Datasource property is usually meant to be connected 
to a .NET DataSet or .NET DataTable (or DataView), but not a TDataSource 
VCL component!

> I know that TADONETConnector component Borland.Vcl.AdoNetDB
> which can be used to make a ADO.NET datatable look like a dataset, but I want the other way.

So you have a TTable or TQuery with data inside, and you want to move 
that inside a .NET DataSet / DataTable, right? That's not that hard to 
do: just walk through the VCL dataset and copy / insert / append each 
record in the .NET DataSet / DataTable...

> Thanks & Rgds,
> R.Saravanan

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com)  Forever Loyal to Delphi
Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
New Delphi 2006 Courseware e-books at http://www.eBob42.com/courseware
Re: How to connect TDataset to ADO.Net DataTable
#38
Author: Saravanan
Date: Fri, 13 Oct 2006 13:58
37 lines
2561 bytes
Hi Bob Swart,

Thanks for the reply, even I was thinking the same but how do I make sure modified data in the dataset (ADO.Net DataTable) get posted in the database (backend).

Do I need a separate Connection,DataAdapter and Command to get it posted to database(because it will be a disconnected dataset with table structure and data from TDataset)?

Thanks & Rgds,
R.Saravanan

Bob Swart <b.swart@chello.nl> wrote:
>Hi Saravanan,
>
>> I have an application that I've ported to VCL.NET and I have used "WinForm Controls Import Wizard" to import a winform control to VCL.Net. The imported control has a property DataSource, for which I want to connect to VCL.Net TDataset(TTable, TQuery).
>
>Note that the .NET Datasource property is usually meant to be connected 
>to a .NET DataSet or .NET DataTable (or DataView), but not a TDataSource 
>VCL component!
>
>> I know that TADONETConnector component Borland.Vcl.AdoNetDB
>> which can be used to make a ADO.NET datatable look like a dataset, but I want the other way.
>
>So you have a TTable or TQuery with data inside, and you want to move 
>that inside a .NET DataSet / DataTable, right? That's not that hard to 
>do: just walk through the VCL dataset and copy / insert / append each 
>record in the .NET DataSet / DataTable...
>
>> Thanks & Rgds,
>> R.Saravanan
>
>Groetjes,
>           Bob Swart
>
>-- 
>Bob Swart Training & Consultancy (eBob42.com)  Forever Loyal to Delphi
>Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
>New Delphi 2006 Courseware e-books at http://www.eBob42.com/courseware
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads