Having recently installed the beta of VS 2010, I'm curious whether anybody knows how to get it to do something that was quite straightforward with VS 6. To create a simple database browser in VS 6, you could create an MFC application using a database view, connected to (for example an ODBC connection. Then, the interesting part. In a normal application, doing a -double-click on the control will bring up a dialog that lets you connect that control to a member variable of the dialog class. In a database application like this, however, it brings up a dialog that lets you connect the control to a field in the database:
Having done this for the fields we care about, we can build the application (note that we haven't typed in a single line of code) and we can browse data from the database:
At this point, we have live data being read from (in this case) a SQL Server database, and we can browse through it, modify data, etc. The development is about like we'd used something like Access, but the output is a standalone executable.
How can I do the same (or how close to the same can I get) using Visual Studio 2008 or 2010?
The last remaining database project templates were removed in VS2008. Nobody writes code like this in C++ anymore. C# and VB.NET, their IDEs have very good dbase integration through the server explorer window. Give it a try, you'll find it easy going.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With