2

We want to allow access to our custom back end data store by pretending to be an ODBC server such as Access or SQL Server. In this way, anyone with those ODBC drivers could connect and send us queries (from anything from asp.net to Excel) which we will resolve on the back end and return a result set.

I have the ability to parse SQL and return result set based on a dynamic sql query. What I don't know is how to pretend to be an ODBC or OLEDB server. I don't even care which server we mimic as long as it's a common one that has drivers that ship with windows.

I have searched but could not find a basic implementation that implements authentication and ExecuteQuery() methods. Does such a .net project exist?

2 Answers 2

4

You could implement an ADO.NET data provider?

see http://msdn.microsoft.com/en-us/library/a6cd7c08.aspx

3
  • 1
    That's probably the best approach. msdn.microsoft.com/en-us/magazine/cc301611.aspx Feb 17, 2012 at 0:53
  • yeah, i can't seem to find any recent articles about implementing one. they're all from like .net 1.0 and stuff! But people still implement providers... Feb 17, 2012 at 0:55
  • 1
    That's because it's technically an "old" technology (read: "mature"). But EF and Linq to SQL use ADO.NET data providers under the hood. Feb 17, 2012 at 0:58
1

The System.Data.Sqlite project is an excellent example of how to build an ADO.NET data provider for an arbitrary data store.

2
  • Yeah they're providing a data provider, but its a new driver. I want to mimic the minimum functionality of an existing network driver like SqlServer or Sybase or something that people have or can install on any platform.
    – powlette
    Feb 17, 2012 at 12:02
  • 1
    There's no getting around the fact that you'll have to write code that interprets your SQL statements and translates them into commands that your underlying data store understands. Feb 17, 2012 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.