DAO-ADO question

S

Sirocco

I have an mdb front end and back end. Will the same DAO code work if I link
my mdb front end to a SQL Server, or do I have to make my code ADO-compliant
as if I were converting my front end to an access project (i.e., ADP)?

With that in mind, is "Forms!Formname.Form.RecordsetClone.RecordCount <> )"
ADO compliant?

Many thanks in advance.
 
J

John Nurick

Hi Sirocco,

As I understand it, a basic "upsizing" simply leaves you with linked
tables connected to the SQL Server database rather than to the mdb back
end, with little if any code changes required. On the other hand
extensive re-working will be needed to take full advantage of SQL
Server. Tony Toews has links to upsizing information at
http://www.granite.ab.ca/access/sqlserverupsizing.htm
 
G

George Nicholson

AFAIK, the recordset returned by Form.RecordsetClone is a DAO recordset, not
ADO.
 
S

Sirocco

You say "the recordset returned by Form.RecordsetClone is a DAO recordset,
not ADO". Then will this function not work with a SQL backend if my front
end is an MDB file?
 
D

david epsom dot com dot au

This function will not work in a number of circumstances:
"Forms!Formname.Form.RecordsetClone.RecordCount <> )"

For a start, a recordcount on an ODBC connection will
typically return "-1".

Also, the recordsetclone object is invalidated by stuff
like changing the RowSource -- precisely when you want a
record count.

(david)
 
S

Sirocco

You state "the recordset returned by Form.RecordsetClone is a DAO recordset,
not ADO." In order to return an ADO recordset with this method, what
syntax should I use? Any suggestion would be appreciated.

Thanks!
 
B

Brendan Reynolds

As I understand it, the recordset returned by Form.RecordsetClone will
always be a DAO recordset *unless* you specifically assigned an ADO
recordset to the Recordset property of the form. But check out
www.trigeminal.com - that's where I read about this, so you might as well go
straight to the source rather then relying on my memory.

--
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.
 
B

Brendan Reynolds

http://www.trigeminal.com/usenet/usenet022.asp?1033

--
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top