Ceno said:
Thanks for your suggestion.
Unfortunely I (still) have a DAO recordset
You can use both DAO and ADO in the same Access application. You just have
to be careful to 'disambiguate' when objects with the same name exist in
both object libraries, e.g. "Dim rst AS DAO.Recordset" or "Dim rst As
ADODB.Recordset" rather than just "Dim rst As Recordset". DAO doesn't have a
..Save method, you'll need to use ADO for that.
and maybe because of that the
parameters are not recognized.
I'm not sure what parameters you mean. But the code I posted is necessarily
ADO-specific, because DAO does not have a save-as-XML feature. The code will
certainly not work with a DAO recordset in place of the ADO recordset.
I presume that the name "Categories" is that of the recordset
No, Categories is the name of the table. This is an example using the
Categories table from the Northwind sample database that comes with Access.
and the ID and
Name extensions are the parameters.
CategoryID, CategoryName and Description are all names of fields in the
Categories table.
Is there an easy way to transform from DAO to ADO?
I don't think so, but I'm not entirely sure what you mean by 'transform' in
this context.
I even couldn't discard the DAO-reference in a new instance of a MS Access
database.
I don't know why you would be unable to remove the reference. But it is not
necessary to remove it in order to use ADO.
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.