Microsoft LINQ Books

Programming Microsoft LINQ & Introducing Microsoft LINQ
Welcome to Microsoft LINQ Books Sign in | Join | Help
in Search

VB6 data

Last post 10-22-2007, 8.37 by Marco.Russo. 1 replies.
Sort Posts: Previous Next
  •  10-20-2007, 11.06 74

    VB6 data

    I'm looking into either an ADO or LINQ method that I can use to access some data contained in a VB6 - written program from withing a C# program that I am developing in the ORCAS beta 2 VS. The data is not in a SQL database, not MDB or Access format nor Jet database, and may well a home-grown db. There is an exposed DLL for accessing the data, but having been written in VB6, it's a very clunky access in C#-9.  I've been investigating ADO ( object data) access, thought about LINQ and then realized that I already had a copy of your book on hand! Having read it once, I was not thinking of this current project, but now that I am I'm wondering if there is a convenient LINQ way to access this database, or barring that, even an ADO method, or should I just give it up and write the clunky code access method? Any help would be very greatly appreciated.

    Paul

  •  10-22-2007, 8.37 75 in reply to 74

    Re: VB6 data

    You have two ways, no one is very easy to implement, and another solution I'd prefer if possible.

    The first way is writing an ADO.NET provider. You would use the whole ADO.NET set of methods, but this would require you to implement a SQL parser. If you do that, you could adopt LINQ to Entities writing a ADO.NET Entity Provider (please note ADO.NET Entity will be in beta until mid-2008).

    The second way is writing a LINQ extension - in this way you might not implement a SQL parser, but you should still implement some typical operation like joins, sorts and so on.

    The alternative solution I'd follow is to simply move the whole VB6 db out to a SQL Server database (or some other RDBMS). Since this would require a read-once algorithm that extracts data from a single table each time, it's much more easy to implement. Of course, this doesn't allow the use of VB6 application on migrated data.

    Marco

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems