When I had the problem I had configured the System.Data.SqlClient.SqlConnection with a
ConnectionString taken from the configuration file (Click on DynamicProperties-ConnectionString-''Map property to key in configuration file''). I had set it to AppDatabaseDSN which is specified in the app.config as:
With this connection string, I generated the dataset and then assigned the dataset to the grid. After moving off the grid dataset property field VS.NET crashed. After restarting and rebuilding the form to the same point as before, I tried the same thing a couple of times over. Crash each time. I then tried an alternative way of setting the connection string by clicking on the drop down for the ConnectionString property of SqlConnection - this listed a connection that I had specified in the Data Connection pane (Server Explorer). The connection string was fuller but otherwise similar - "workstation id=MyWorkstation;packet size=4096;user id=sa;data source=localhost;persist security info=True;initial catalog=AppDatabase;password=password"
With this connection string, VS.NET did not crash when I assigned the associated dataset to the grid. Instead it painted the grid in design mode showing the column headings that it had extracted from the query. As a test I went back to the old way of specifying the connection string, and the crash occurred again. I don''t know why the original connection string (or way of specifying it) should not work, but I guess funny things just happen sometimes...:)