Can it be read only ?

J

Jason

I am using Access 97 to connect a data source (MySQL) via ODBC.

I have linked the tables in MySQL to the Access database and developed a
Select Query to retrieve information from the MySQL database.

I would like to know does the result of the SELECT query read-only ? If
not, what attribute of the SELECT query should I change so that it is
read-only ? This is because I don't want to change the content of the
database in MySQL accidentally.

Thanks
 
R

Rick Brandt

Jason said:
I am using Access 97 to connect a data source (MySQL) via ODBC.

I have linked the tables in MySQL to the Access database and
developed a Select Query to retrieve information from the MySQL
database.
I would like to know does the result of the SELECT query read-only ? If not,
what attribute of the SELECT query should I change so that it
is read-only ? This is because I don't want to change the content
of the database in MySQL accidentally.

Thanks

Set the RecordSetType to Snapshot.

Or you could use passthrough queries instead of linked tables. They are
automatically read only.
 
R

Rick Brandt

Jason said:
Dear Rick,

Can you give me some hints on what pass-through queries are ?

It is a special query that uses your ODBC connection to send SQL directly to the
source database engine for processing. Access and Jet are not involved until
the records (or errors) are returned by the server database.

Because the SQL statement is sent directly to the server for processing it
actuallly has to be written in the SQL dialect of that server which means that
you have to build the query in the SQL view of the query. You cannot use the
query design grid.

To create one start a new query in design view and then from the menu use...

Query - SQL Specific - Pass-Through

The window will automatically change to SQL view. You would also need to open
the properties window and specify your ODBC DSN or connect string in the Connect
property. If you don't you will be prompted for an ODBC source when you run the
query.
 
M

MacDermott

I've never worked with MySQL, but in SQL Server I would create a View, and
give the user read-only permissions on it, instead of linking directly to
the table.
That way your data is protected, not just from this application, but from
anybody else who might be linking to it...
 

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

Top