Monthly Archives: January 2005

C# for VB6 developers

I am doing this talk at Visual Studio Connections on an inspiration from my painful experiences of diving into C# on occasion. There are a bunch of things that bite me over and over since I don’t use C# consistently enough. I also remember spending about 1/2  hour trying to figure out how to say “OR” in C#. Lots of syntax things like how to construct IF may not seem hard, but if you have been doing it a different way for 5 or 6 years, it really is hard to sort out brackets here, parens there, brackets sometime, not others. And all of the problems that cause compile time errors that are not picked up by intellisense are huge pain points as well, especially when the compile time error message isn’t really telling you what the problem is. Sure there are extensive books on the differences, but I am just going to try to point out the things that a VB6 dev probably uses the most frequently and the most naturally, and try to ease some of the pain of the transition. This isn’t so much for the purpose of converting VB developers to C#, but being sure that folks are at least somewhat fluent in C# even if they go the route of VB when they make the move to .NET. This talk will actually be pretty much the same as if I were doing it VB.NET vs. C# as well.

http://www.AcehAid.org

Rob Howard coming to Vermont.NET

lucky us!!! Rob Howard is coming to Vermont.NET on February 21st. We are getting a Black Belt ASP.NET Tips & Tricks talk. This is happening thanks to INETA as Rob is an INETA speaker.

I had tricked Rob into coming here with the promise of some fun snowboarding at near by Sugarbush, but unfortunately he had to change his plans and is now doing a quick overnight trip. This also means that we couldn’t schedule him with other “nearby” groups – such as Montreal (2 hrs away) or Boston area (3.5 – 4 hours).

http://www.AcehAid.org

Buggy explains why stubborness is a good programmer quality

Why being stubborn is good when you are a programmer

I agree. Though actually I have always said I am stubborn and lazy. Stubborn is the “I will NOT let the computer win” part, and lazy is the part the makes me not want to write the same code over and over again. We all know that it takes more time to write reusable code than to just whip out some code to solve a particular problem. But it’s worth it to make it reusable so you don’t have to do it again. Or to write code that will automate more processes. Etc. Lazy, I say.

http://www.AcehAid.org

Deduct Tsunami relief donations made through Jan 31

From Chris Pels’ blog:

The IRS has enacted a new law which allows individuals to deduct contributions to recognized charitable organizations for Tsunami relief on your 2004 tax return even if you make the donation through 1.31.2005. Usually those contributions would have to be made by 12.31.2004. Read the IRS guidelines on what determines if an organization would qualify before making your donation. This is a great opportunity to help so many people in need and qualify for a deduction as well.

http://www.AcehAid.org

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