Success! - 1st .NET-MySql-ArcObjects project
15 04 2006Hurray! My 1st attempt at integrating data from a MySql database into a .NET & ArcObjects application worked. It's pretty rough and only for internal use at this point. It was much easier than I expected.
The data comes from a PHP based web app that I wrote to help us manage our large number of Breeding Bird Census counts that we do. For the last 6 years all survey data was reported on an excel spreadsheet with an accompaning word document describing survey stations and conditions. There was no connection between any of this data and it was a terrible pain to anylise the data if we wanted to. The database & web app have made it a very simple task to enter the observations & quickly produce a report without having to enter the same thing several times on servral different documents.
The only problem left to be solved was the best way to get new or changed station coordinates out of the MySql database and onto the clients map. First, I tried just writing a comma delimited test file and having people "Add X&Y Data". However, it was really too many steps for this to work well for my users. Then I made an ASP.NET app which worked great on my computer but had all sorts of problems when we put it on our webhost. Turns out they were running .NET 1.1 and I wrote it in Net 2.0. So I was now serveral days behind on getting this tool out to people and decided on a very simple and quick desktop client application. I used VS2005, which seemed to do fine with MySql in the dataset designer and other fancy feature parts. But whenever it lost connection with the DB for any reason, it crashed VS and forgot about the dataset and threw errors like crazy when you started the project up again. So I finnally had to simplify even more and just program the automattic creation of the dataset and data tables into the code. Once I got VS to play nice with MySql the rest of it was very easy. I just re-used the "create empty shapefile" code I got from the an ESRI KB article a while back and populated it with my points.
I know it's not much but, it was a good day for me to have that work. After banging my head against the wall on several other projects, it was nice to have the 1st published instance of a program integrating 3 things I had never tried to integrate before work correctly and in a bug-free way.
Categories : Uncategorized


Recent Comments