DAO to ADO

whomademe

New member
Local time
Yesterday, 16:05
Joined
Jan 4, 2018
Messages
4
I am starting to look at converting my DAO to ADO in our access system.

I am thinking this, as I want to create myself a roadmap to ultimately converting to TwinBasic (sitting over MSAccess, and later on, SQL server)

Do I need to? Can I port across and use DAO, or should I move?

If so, is there any resource on pitfalls, workarounds, etc?

Thanks....
 
I would not do such a conversion. Trading time for value, I would get going in TwinBasic--which supports DAO anyway--long before I would convert an exiting DAO application to ADO.
 
Be aware that reports do not work with ado recordsets and some form functionality such as filter and sort will generate an error (although you can write your own )

You have to set the option to use ANSI 92 for forms/reports to work with ADO - but ANSI 92 is over 30 years old and in terms for filtering, quite restrictive on what can be used - and I would expect DAO to no longer work
 
If you are using Access as your data there in point whatsoever in converting. ADO is slower and less flexible.
 
Be aware that reports do not work with ado recordsets and some form functionality such as filter and sort will generate an error (although you can write your own )

You have to set the option to use ANSI 92 for forms/reports to work with ADO - but ANSI 92 is over 30 years old and in terms for filtering, quite restrictive on what can be used - and I would expect DAO to no longer work
Are you sure about all of that? It is true that disconnected ADO recordsets do not work with reports but don’t remember there being a general issue. Similarly with ANSI 92
 
I think the point is that if your BE is Jet/ACE there is no gain by doing this conversion and if your BE is SQL Server, there is probably also no gain or at least not enough to justify the effort. If you have slowness, you need to better understand your schema and how to build queries and why to not use VBA loops or the build in form filters when you can use queries to do something.

I build all my apps with the intention of either immediately or at some later date being converted to using SQL Server. That mostly impacts how I define forms and filtering. It also affects queries since SQL Server cannot process VBA or UDF functions. They have to be processed in Access where VBA is available. So, although you can use VBA and UDF functions, you need to restrict them to the select clause so they can be applied AFTER SQL returns the recordset. If you need them in other clauses, you may need to later create stored procedures or pass through queries so mark the code and make notes to self. In the cases where I use DAO, it affects the code I use since SQL Server will in certain cases require dbSeeChanges (among other arguments). Well, I add the arguments NOW. Access doesn't care and I know that SQL Server WILL so my goal is to make the ultimate conversion as painless as possible and in most cases, I can convert an app I built to SQL Server in a day or so but the actual time really depends on how large the app is because it all needs to be carefully tested to make sure I haven't been sloppy and missed something.

So far, I've never had to convert to ADO. And, I've only rarely had to resort to stored procedures, unbound forms, views, and pass through queries. Most often, a view to take care of a join, solves a small slowness problem. But then so far, my SQL Server apps have been using sound LANs. If you are using remote databases, you may have to do a lot more work.
 

Users who are viewing this thread

Back
Top Bottom