"PC Datasheet" <no****@nospam. spam> wrote in
news:RF******** ********@newsre ad1.news.atl.ea rthlink.net:
I have zero experience with using a SQL database for a backend and
Access for a frontend. I have some questions:
1. Does an SQL database have tables?
2. How does Access connect to the data in an SQL database? Linking,
importing, or ???
3. Earlier today there was a thread regarding DAO and ADO. In the
thread it was said that ADO is very useful when the backend is a SQL
database. Could someone explain that?
4. Can an Access frontend update data in a SQL database backend? How?
5. Is there a website that provides answers to these questions?
Thanks for all input!!!
Steve
PC Datasheet
Hi Steve,
Some answers to your questions are:
1) Yes
2) You would link to the tables via ODBC. You can also import and export
using an ODBC link via Access. (TransferSpread sheet, TransferText)
3) ADO is useful when dealing with SQL data. However you can use DAO to
accomplish many tasks. I tend to use more DAO in my coding because I am
more familiar with it. This is an example:
'***Declare the variables
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim strSql as String
'***Set the variables
strSql = "SELECT * FROM tblTemp;"
'***CurrentDB is the Access database you are using
Set db = CurrentDb
'***Specify the recordset
Set rs = db.OpenRecordse t(strSql)
'***From here you would read the Recordset for values
'***and generate whatever you wanted, based on the results.
*Note---In order to use DAO the Access database must have a Reference to
a DAO Library (DAO360.dll, DAO351.dll, etc...). This is true for ADO too.
But don't try to use both at the same time. It WILL cause problems.
Choose one and stick too it.
4) An Access front-end can certainly update SQL tables. For example:
a) Link to a SQL table with an ID field.
(The ID Field can be anything but I have generally used
fields with a datatype of <int> for integer.)
b) Once this has been done you can use Access queries ---
(Append, Update, Delete) to change the data.
5)
http://www.mvps.org/access/ is an excellent site to begin with
These are general answers and as many computer-folk will tell you there
are 100's of ways to do the same thing.
Hope these help!
strvariant