PC Review


Reply
Thread Tools Rate Thread

cloning Datatable into a Typed DataTable?

 
 
Elhanan
Guest
Posts: n/a
 
      24th Feb 2005
hi..

i'm saveing a Type DataTable into an xml file..

how ever if i try to read a DataTable, i'll need a typed DataSet to
read it, but the typed dataSet creates simply adds a regular table and
does use one of the typed ones..

quiest way i could find was:

OracleConn conn=OracleConnectionFactory.GetBprPod();
OracleDataAdapter adap = new OracleDataAdapter("SELECT * FROM
V_BPR_DOCUMENTS where MS_HAVILA=1416775",conn.ConnectionString);
DataTable dt = new DataTable();
adap.Fill(dt);
DsBpr.BprDocumentsDataTable temp = new
DsBpr.BprDocumentsDataTable();

for (int i=0;i<dt.Rows.Count;i++)
{
temp.ImportRow(dt.Rows[i]);
}
for (int j=0;j<temp.Count;j++)
{
Console.WriteLine(temp[j].SHEM_KOVETZ);
}

any faster ways?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I assign a typed DataTable to its typed DataSet? A.M-SG Microsoft ADO .NET 6 1st Feb 2006 06:13 AM
Convert a DataTable to a Strongly Typed DataTable. Anibal Microsoft ADO .NET 4 22nd Jan 2005 05:26 PM
How can I add a row from a typed datatable to another instance of that typed datatable? Ersin Gençtürk Microsoft ASP .NET 1 6th Oct 2004 02:11 PM
Converting an untyped datatable into a typed datatable =?Utf-8?B?UmFrZXNoIFJhamFu?= Microsoft C# .NET 3 17th Jun 2004 02:37 PM
Converting an untyped datatable into a typed datatable =?Utf-8?B?UmFrZXNoIFJhamFu?= Microsoft C# .NET 0 17th Jun 2004 01:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:31 PM.