Library tutorials & articles
Implementing ODBC in ASP .NET
- The Problem
- The solution (sort of)
- Making it work
- The source code
- Conclusion
Making it work
Ultimately, the solution to this problem is for some enterprising developer to pick up the reins and finish what Microsoft started by writing a set of fully functional ODBC server controls. In the meantime, however, it turned out to be relatively straightforward to examine the code generated by the OLE DB server controls and adapt it to the ODBC object set.
The remainder of this article walks the reader through one such solution. The subject is HotQuant’s News & Updates page. With respect to the database, the page's requirements are simple:
- It must be able to locate a single record in the database based on an e-mail address, which is the table's primary key.
- If it can locate a record, it must modify it.
- If it can't locate a record, it must insert a new one.
The reader will note that, although the functionality described above requires SQL Select, Insert, and Update commands, only the Select command is defined in the code below. This is possible because an OdbcCommandBuilder object, once associated with a particular ODBC Data Adapter, automatically generates appropriate Insert, Update, and Delete commands when prompted by corresponding calls to the Data Adapter's associated Dataset.
Since the primary focus of this article is the ODBC connectivity issue, we have abridged the code presented below in order to highlight that functionality.
Related articles
Related discussion
-
Profile Class does not work after Translation
by converter2009 (1 replies)
-
what is the SQL Server Provider
by hayperaktib (1 replies)
-
Very Urgent regarding deleting the images from a folder
by Nanosteps (6 replies)
-
Java Script, File uploading on ftp server using java script code
by h_c_a_andersen (2 replies)
-
sharepoint calendar web part with events from sql table
by converter2009 (2 replies)
Related podcasts
-
StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team
Scott chats with Jeff Atwood of CodingHorror.com and most recently, StackOverflow.com. Jeff and Joel Spolsky and their technical team have created a new class of application using ASP.NET MVC. What works, what doesn't, and how did it all go down?
Events coming up
-
Mar
15
DevWeek 2010
London, United Kingdom
DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.
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.