Sunday, January 16, 2005

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
Sunday, January 16, 2005 2:56:54 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
In preparation for the ADO.NET 2.0 talk I am doing at ASP Connections in March, I am now looking at ADO.NET 2.0 from the perspective of a web developer and how some of these features will specifically enhance web development. It's an interesting way to look at it since every type of database programming with .NET benefits from these changes.

http://www.AcehAid.org
Sunday, January 16, 2005 2:00:56 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I have written before about the wonderful new parameter of the DataView.ToTable method - DistinctRows.

Interestingly, the new DataTable that is created still has ties to the parent DataSet. So if you want to add it to another DataSet you will have to use the DataTable.Copy, rather than the new DataTable, itself.

 

http://www.AcehAid.org

Sunday, January 16, 2005 1:50:12 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

(I have modified this post)

When you move a DataTable's guts into another via DataTableReader, DataTable.CreateDataReader and DataTable.Load in ADO.NET 2.0, you don't carry over the DataSet parent hook and therefore you can add this 2nd DataTable to another DataSet without having to worry about using Copy. Just a little itty bitty thing.


http://www.AcehAid.org

Sunday, January 16, 2005 1:31:34 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

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
Sunday, January 16, 2005 1:19:30 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, January 15, 2005
 
What if your neighborhood suddenly looked like this?

This is what the Aceh Aid at IDEP-supported volunteer team saw in Banda
Aceh. Where does one begin?

All we can do is help. How could we do otherwise?


http://www.AcehAid.org
Saturday, January 15, 2005 1:10:38 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, January 14, 2005

Susi  Johnston posted a picture and an explanation of an elephant helping the Aceh Aid at IDEP volunteers in Aceh Province. Here's the picture.



http://www.AcehAid.org
Friday, January 14, 2005 10:25:48 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I'm watching Josh Ledgard giving a tour of all the cute guys (and girls, too, yippee!!)  on the VS Core Team ;-)

I just wanted to lay this quote down that came out of a conversation on debugging:

"there's no correlation between the size of the error and the effect it has on the product"

Having been a programmer for over 20 years I can only say "amen" to that comment.

As always, this inside look is really interesting and enlightening.

Okay, back to watching some more!

ooh - looks like hte BCL team is on channel 9, too! Kewel!!!

http://www.AcehAid.org
Friday, January 14, 2005 5:51:19 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, January 13, 2005

The FBI is scrapping may scrap a $170million dollar investment in a failed custom software application. One hundred and seventy million dollars to write a computer program? And it's SO bad that they are trashing it? Aaaaaaaaiiiiiiiiiiiiiiieeeeeeeeeeeeeeeeeeeeeee! How do companies (the company that has $170M in their pocket) get away with this sh*t? I heard the story on NPR but it's not online yet so here's a CNN link.

From that CNN article: Sen. Patrick Leahy of Vermont, the ranking Democrat on the Senate Judiciary Committee, called the program "a train wreck in slow motion."

http://www.AcehAid.org

Thursday, January 13, 2005 7:58:05 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, January 12, 2005

Werner Vogels has just been named CTO of Amazon.com.

We can all say "we knew him when"....



http://www.AcehAid.org
Wednesday, January 12, 2005 9:45:50 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Richard Sprague wonders why Text To Speech does not get more attention. I thought I would share a valuable use of this technology.

I had to implement a TTS solution years ago in a VB6 app and it solved a huge problem for my client. I used Chant's fantastic SpeechKit package to accomplish this.

The problem was that we create a daily schedule for technicians out in the field. At that time we were not yet publishing the schedule to the web (of course, we are now). So, in order for techs not to have to come into the office just to get their info, each one of them had a special extension on the phone system. At the end of the day, the scheduler would have to dial each person's extension and leave them a voice mail detailing everythign they would need to know about the next days' work. In the summertime, there are about 70 field technicians. This solution was great for the techs but not so for the person who had that horrible chore.

I figured out how to take the data that was getting pushed onto the big schedule report and use Ms. Microsoft Mary (this was before the huge revision of the MS Speech tools) to "read" the information into individual WAV files. The tricky part was finding a DOS utility to convert the wave files into the format used by their voice mail system. Because of the many hurdles I was told by many, including the company that owned the voice mail system, that this project couldn't be done. But my client had faith in my pit bull like qualities when I am told "can't be done", and I persevered. Although still Mary has to "read" the info in real time, we run multiple instances of my app and she can do the whole process in about 20 - 30 minutes while the scheduler is able to do other tasks.

This has saved my client about 2 hours a day, 5 days a week for the past 4 years or more years. It was well worth the effort.



http://www.AcehAid.org
Wednesday, January 12, 2005 4:17:18 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Thom Robbins is posting the session proposals for Code Camp III, Mar 12-13.

Follow the "call for speakers" link on that page to submit your session proposals!! They can be formal presentations or informal chalk talks.



http://www.AcehAid.org
Wednesday, January 12, 2005 1:52:16 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Union Mutual of Vermont Companies

Insurance Company, Montpelier Vermont

ANALYST PROGRAMMER

     The successful candidate will be highly motivated and possess strong analytical organizational and communications skills.

     Qualified candidates will have an appropriate 4 year degree or equivalent work experience developing and maintaining web based applications. Ability to program in a team environment utilizing ASP.NET, C#, Microsoft SQL and AS/400 databases is required. A strong foundation in HTML, web standards and security is desirable.

     We offer a challenging position in a professional working environment with competitive salary and excellent benefits including pension and 401K plans.

     Qualified candidates are encouraged to submit in strict confidence a resume with cover letter to:
Union Mutual of Vermont Companies
VP - Information Systems
PO Box 158
Montpelier, Vermont 05601-0158

or submit to Resume2005@umfic.com



http://www.AcehAid.org
Wednesday, January 12, 2005 1:15:51 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, January 11, 2005

With new stories in the media about concern for western aid workers in Aceh Province, it is extremely heartening to see that the aid coming from IDEP (the folks I'm working with) is being supported by the Indonesian military.

From Susi's blog:

The Indonesian military and other groups have come together in support of IDEP's mission on the Sumatran coast, and it is with their blessings and support that the work continues.



http://www.AcehAid.org
Tuesday, January 11, 2005 10:28:01 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Not sure if I mentioned that I am doing a 1/2 day pre-con workshop at ASP.NET Connections on March 20th (Orlando).

I am taking my WSE2 Security for Dummies talk and doing it for THREE hours, rather than trying to smoosh what is actually two presentations into one 75 minute session.  This is the way I prefer to do this talk because the point is to try to share what I know about WSE2 (and the security basics you need to grok in advance). I just can't do it to my heart's content in 75 minutes.

It's from 1-4 pm on Sunday March 20th.  There are 3 morning sessions also if you want to make a full day of it. Here are the details of the pre and post con sessions.



http://www.AcehAid.org
Tuesday, January 11, 2005 1:33:45 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

just had to:

I am nerdier than 34% of all people. Are you nerdier? Click here to find out!

Tuesday, January 11, 2005 1:04:30 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I just noticed this!! Previously in Visual Studio.NET, when you right clicked on a .NET class in debug mode and chose "go to definition", it would bring you to that class in the object browser. Now (nov ctp), it opens up the code for the class!! Not that this is always what I'll want to do. (And of course, it's probably just some expirementing and not a reflection of what will be in the final bits. I'd be curious to find out.) Sometimes I want to just inspect a class without the goo.. Actually, I *am* having some trouble with the Object Browser in the latest bits, but that doesn't trouble me, since I have Reflector for .NET v4 which works with .NET 2.0. Yippee.



http://www.AcehAid.org
Tuesday, January 11, 2005 11:26:57 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Mario Cardinal's presentation last night at Vermont.NET was fantastic and well attended!

Mario is one of those guys that big companies call in when they have enterprise problems that nobody can solve. He has been programming forever (it seems from all of the references he makes) and comes from a serious C++ background. (He is also a great presenter - in case anyone is interested in knowing that.)

I have hardly used the current application blocks - struggled with the updater and (sorry folks) but turned my nose up at the Data Access App block.

However, as he went through the various application blocks in the Enterprise Library (something I have really wanted to have happen a the user group for a long time  - I was so happy when he suggested it) I recognized a few things that relate to WSE.

A lot of the blocks encapsulate things that I know I want and need to do in my applications that i have not taken the time to learn yet. So though I may be QUITE cozy with ADO and therefore have that snobby reaction to teh DAAB, I am not very good with event logging, for example. (Want to see my scores on my cert tests? Great on everything except really crappy on tracing/debugging and it is the tracing that brought me down.) So, like WSE, there are a few ways I could leverage these application blocks in their most basic way and get some quick and immediate funcationality into my app without having to (or should I say ... before I have been able to) really learn about how that works. Just like with the basics of WSE2, you can just plug some key security into your web services without much education. Then like WSE2, I could start learning more about that particular task and leverage some of the more indepth features of the application block even customizing or extending it.

Another similarity to WSE2 is this. WSE, web services, even xml, are truly designed to handle interop issues. I am not doing interop. I am just writing .net clients with a .net back end. But I am using WSE2 in my solution becuase it was a quick and easy way to get some really good security built in.

The Enterprise Library is for Enterprise developers/applications. I am not writing enterprise application. But I will definitely be considering using those tools in my little apps, again, just to plug in some important functionality.

I fear this is another place where people will be making faces - it's overkill, more than you need blah balh blah. I've heard the same about my use of WSE2. And don't think that a million other developers like myself won't be using WSE2 in the same way that I'm doing it. I will definitely pay attention to community response to the Enterprise Library as it moves from specs to usable code. 



http://www.AcehAid.org
Tuesday, January 11, 2005 9:23:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Reeling from the effects of the tsunamis, now this unbelievable flooding, mudslides and more in California. Sadly also some have died there. Just because it's 3 and not 150,000 doesn't make each death any less significant. Wrack and ruin along the california coast line.



http://www.AcehAid.org
Tuesday, January 11, 2005 8:43:37 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
acccch . Just wrapping up last edits on a debugger visualizer article only to disccover the implementation has (as promised) changed. As soon as I can get my code to actually compile based on the new documentation (which seems to be a bit of a challenge), I'll let you know what the changes are, if you haven't found them yourself. I'm still on Nov CTP (similar to Dec CTP though without enterprise stuff).

http://www.AcehAid.org
Tuesday, January 11, 2005 8:17:48 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |