Daily Archives: January 16, 2005

I have lost my mind!

Perhaps, it’s true 🙂 (and hopefully just momentary…)

I have LOST MY MIND!

this works just fine:

Dim conn As SqlClient.SqlConnection = New SqlClient.SqlConnection(“server=myserver;Trusted_Connection=True;Database=pubs”)

Dim cmd As SqlClient.SqlCommand = New SqlClient.SqlCommand(“select * from authors”, conn)

Dim da As New SqlDataAdapter(cmd)

Dim ds As New DataSet

da.Fill(ds)

Dim ds2 As New DataSet

Dim t As DataTable = ds.Tables(0).Copy

ds2.Tables.Add(t)

what happened to the “DataTable belongs to another dataset“ exception? Was it only in 1.0 and I just never tried it again with 1.1? I know I struggled with this forever a long time ago.

oh do I need a vacation.

Rather than just searching for workarounds or whining about this problem in my blog, I have submitted a suggestion in the Product Feedback Center. If you think this will help you, go vote on it. If you think this is a stupid idea, go vote on it.

Problem Statement:
Opened by Julie Lerman on 2005-01-16 at 11:53:05
   
In .net 1.1 we had to find workarounds to get a copy of a DataTable that is part of one DataSet into another DataSet. Many devs wasted a lot of time with Copy and Clone thinking there *must* be a way.

In .NET 2.0 it looks like the best way to do this now is with CreateDataReader, Load into new DataTable then add DataTable to DataSet.

 

Proposed Solution: Create DataTable method that will create a new DataTable that does NOT have the connection to the parent DataSet? Either a method or a parameter of Copy?

Thanks.



http://www.AcehAid.org

Code Camp III Submissions

I submitted some abstracts for Code Camp III. All of the Code Camp submissions are being displayed here on Thom Robbin’s site. You can submit abstracts up until the end of January and then Thom, myself, Chris Pels and a few others will start building a schedule. Since Rod Paddock is beginning his little North American User Group Tour at Vermont.NET on the Monday following Code Camp (March 14th), he has also put some sessions in for Code Camp. So now his tour will be extended even more. We should start tracking his tour on MapPoint – Waltham MA, Burlington VT, Montreal QC and then Toronto ON are on the list so far!!

I was happy to see a submission by my pal Dave Burke!! He has been doing some amazing things with customing .Text for his own blog site, so his session is to share some of the things he has learned about custominzing .Text.

http://www.AcehAid.org