Can I use DAO in .ADP to SQL Server ?

  • Thread starter Thread starter S.L.
  • Start date Start date
S

S.L.

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

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)
 
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,
adLockOptimistic
for r/w
 
Back
Top