Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
Available now!
Buy at Amazon US or
Buy at Amazon UK


» Windows API reference
» Webcam streaming in VB.NET
» Remoting with firewalls
» RSA from first principles
» Key & MouseLogger in .NET
» Networking Resource Kit for .NET
» Migrating VB6 Winsock to VB.NET
» Migrating C++ sockets to C#
» RFC Reference guide
» COM Reference guide
» WMI Reference guide
» SQL stored procedures
» TCP & UDP port reference
» NET Framework reference
» Ethernet Type codes
» MAC address assignments
» DLL entry point reference
» Boost SQL performance
» Free SMS UK
» Free SMS Ireland
» Free SMS South Africa
» Internet Explorer

Contact us

2.0 SQL to XML converter, in C# and VB.NET

There has been a lot of work over the past few years in standardizing database access methodologies. One of greatest paradigms in database access is the advent of OleDb (object linking and embedding for Databases). This makes it possible to connect to many different types of database, and manipulate them using a common object model, changing only the connection string.

However, with the advent of the Internet, having local access to a database is not enough, people expect to be able to access enterprise data from any device, anywhere. This means that database queries and results need to be in a common format, regardless of the underlying database architecture, be it Access, SQL, Oracle, MySQL etc. The general consensus is that this format should be XML. Although there are many ways in which XML could describe a database result set, here, we use a format that is quite native to .NET, but yet still very portable.

Porting database queries and responses over the Internet is not the only application of this technology. In fact, it may be very beneficial to your application performance if, for instance you were to store the results of long-running stored procedures in XML, and cache them for later.

This C# (and VB.NET) application can execute SQL queries on any type of database, and return the result in XML. To use this utility, type the DSN and SQL statement into the boxes provided, and press “Query”. If you are unfamiliar with DSN or SQL statements, please refer to your database documentation, or Chapter 2 of “Network Programming in .NET”

(Source code availabile in the book Network Programming in .NET (Buy at Amazon UK) (Buy at Amazon US), Chapter 2, Example 6)

Page 2  Page 3  Page 4  Page 5  Page 6  Page 7  Page 8  Page 9  Page 10  Page 11  Page 12  Page 13 


Copyright 2015 Open Merchant Account Ltd.