|
-
Feb 8th, 2012, 03:06 PM
#1
Thread Starter
Addicted Member
[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?
-
Feb 8th, 2012, 03:54 PM
#2
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
-
Feb 8th, 2012, 09:11 PM
#3
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.
-
Feb 9th, 2012, 02:33 AM
#4
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|