Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create a simple DB browser with VS 2010 like I could with VS 6?

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:

DB Field selection in Add Member Variable dialog

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:

Browsing live data

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?

like image 759
Jerry Coffin Avatar asked Feb 05 '10 23:02

Jerry Coffin


1 Answers

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.

like image 116
Hans Passant Avatar answered Sep 19 '22 14:09

Hans Passant