Library tutorials & articles
Implementing ODBC in ASP .NET
- The Problem
- The solution (sort of)
- Making it work
- The source code
- Conclusion
The solution (sort of)
Microsoft’s omission caused an enormous hue and cry from stalwart ASP developers who wanted to move to the more powerful .NET application framework while retaining access to their beloved ODBC drivers. It also caused a great deal of confusion among newcomers to Visual Studio .NET who tried—and failed—to make the new .NET OLE DB server controls connect to their ODBC DSN’s. Microsoft responded with a new set of data server controls targeted specifically at ODBC connections, which are available for download here.
Unfortunately, there’s a catch. The normal procedure for establishing an OLE DB or Server data connection within Visual Studio .NET goes something like this:
- Drag the desired table or data view onto the web form. Visual Studio creates the appropriate Data Connection and Data Adapter objects.
- Select Generate Dataset from the Data Adapter’s pop-up menu. The resulting wizard guides the user through a Dataset design process, ultimately producing an appropriately formatted XML schema for the dataset.
- Select Configure Adapter from the Data Adapter’s pop-up menu. The resulting wizard guides the developer through generating the appropriate Data Command objects and hooks these to the dataset, generating all the required code behind the scenes.
On attempting the same procedure with the new ODBC server controls, the user quickly finds that the ODBC Data Adapter server control’s pop-up menu does not include the Generate Dataset and Configure Adapter options. In short, Microsoft has provided the requisite data objects, but has left out the logic required to wire these objects into .NET’s new XML-based Dataset standard.
ASP die-hards will wonder why all the fuss… after all, the old ADO recordset object is still available, and it works as well now as it did before. The developers of the new ODBC server controls must have had the same thought. The answer, however, is that in bypassing the new .NET Dataset, a developer cuts himself off from one of the more flexible and innovative articles in the .NET toolbox. Besides, nobody negotiates the very steep .NET learning curve in order to keep doing the same old thing.
Related articles
Related discussion
-
Gizmox Announces release of Visual WebGui SDK version 6.2.2
by Visual WebGui (0 replies)
-
Error 4 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
by lbargers (3 replies)
-
How to receive data in web server sending from GPRS modem
by AshokSingh (1 replies)
-
Working with frames in c# .net
by pulak2008 (0 replies)
-
Time Out Problem
by lorrainepetty (1 replies)
Related podcasts
-
CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly Media
CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly MediaHosts Ken Levy and Markus Egger discuss the new State of .NET events, IE8, ASP.NET MVC, followed by an interview from PDC with two editors from O'Reilly Media. More on ASP.NET MVC can be found at http://asp.net/mvc. Interview...
Related jobs
-
Microsoft .Net Architect
in AMSTERDAM (€50K-€90K per annum) -
Microsoft Dynamics CRM Technical Consultant
in Netherlands (€50K-€90K per annum) -
.net developer
in Rijswijk (€2K-€4K per annum)
Events coming up
-
Dec
3
An afternoon of SQL Server Data Services and ASP.NET Dynamic Data
Bradford, United Kingdom
This event is in association with Black Marble. In the morning Black Marble will be presenting on Microsoft "Oslo": The Future of Enterprise Applications. To find out more about this please follow the link on the right.
i am a new user for ASP.NET.
i created a webform.aspx, using the html code i had created
a textbox and a button. and write the code in *.vb, then try to
run the webform.aspx i donot see any output or atleast the
tools. once i go into the webform.aspx i cannot see the code but i can
have the controls. why this could happen?
thanks.
This thread is for discussions of Implementing ODBC in ASP .NET.