Can I use DAO in .ADP to SQL Server ?



I've no experience writing code by using ADO before. I usualy uses DAO to
access .MDB database. I deciding to use Access 2002 Project and SQL Server

I'ld like to ask you. What happen if In .ADP code, I not reference to ADO
object library but references to DAO object library instead ? Can I still
access data in SQL Server ? Or I should not do that, Why ?

(if not necessary, It good for me to not waste time to study programming
using ADO)

BJ Freeman

When an ADP is opened, it usually connect to the SQL Server. This is set up
in the File->connection dialog.

to do something on the SQL server, use
dim RS as ADODB.Recordset

set RS = currentproject.connection.execute( "Select * from XmlTable") for
read-only or

RS.Open "Select * from XmlTable", currentproject.connection, adOpenKeyset,
for r/w

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