Results 1 to 4 of 4

Thread: [RESOLVED] Interop.ADODB.dll to Ado.Net - easy to change?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Location
    Uk
    Posts
    157

    Resolved [RESOLVED] Interop.ADODB.dll to Ado.Net - easy to change?

    My app currently uses Interop.ADODB.dll to retrieve data from an access database.

    My compiled setup file has to include a Interop.ADODB.dll file for the software to work.

    What would i have to do in order to convert my app to drop the interop file by using Ado.net instead?

    Would it simply be a matter of changing the references and connection strings or does it involve alot more than that?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Interop.ADODB.dll to Ado.Net - easy to change?

    It involves a lot more than that... but in the long run, would be well worth the effort...

    Probably the first thing to do would be to familiarize yourself with the ADO.NET model and how to use ot to extract data.

    You can find more on that in our Database FAQ and Tutorials thread in the Database Development section...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Interop.ADODB.dll to Ado.Net - easy to change?

    There are a lot of similarities between ADO and ADO.NET but there are also a lot of differences. For one thing, ADO works connected by default while ADO.NET works disconnected. That means that as you make changes in your app using ADO, the database is modified in real time. With ADO.NET, you only make changes to a local copy, which you must later commit.

    ADO.NET also follows good OO practise by utilising multiple objects that all have a specific job to do, e.g. one for the connection, one for the command, one for the table, etc, while ADO basically uses the Recordset to do everything. Mainly for this reason, it's best not to try to "convert" code. Instead, first isolate your data access code into methods and then completely re-implement those methods using ADO.NET. Forget your old code and just think about what you want to accomplish and then write the best ADO.NET code you can to accomplish it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2009
    Location
    Uk
    Posts
    157

    Re: Interop.ADODB.dll to Ado.Net - easy to change?

    Thanks for the info guys - i'll have a read up on ADO.NET and try to rewrite the code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width