Problem after upsizing

M

MarcVS

I've done the upsizing of my Access database with the SSMA wizard of Access.
This has worked well, but I've got the following problem:

On a lot of places I have this code:

Set DB = DBEngine.Workspaces(0).Databases(0)
Set MyTable = DB.OpenRecordset("Name_Of_Table", DB_OPEN_TABLE)

When I run the code, it gives me an error:

'Illegal operation' (something like that, I have a Dutch Access...)

I've changed the DB_OPEN_TABLE to DB_OPEN_SNAPSHOT. This works on some
places, but when I have:

Set DB = DBEngine.Workspaces(0).Databases(0) ' Create database
reference.
Set MyTable = DB.OpenRecordset("Name_Of_Table", DB_OPEN_SNAPSHOT) '
Create table reference.
With MyTable
.Edit
!FactuurPrint = False
.Update
End With

I get an error:

'The Operations is not available for this type of Object'

I suppose this is because a SNAPSHOT is read-Only.

Does anyone know a solution for this?

Marc
 
G

Guest

Marc, I was in the same situation as yourself. Go to page 8 of this
newsgroup and look for the topic CurrentDB in ADP. Rob gives a great
explanation. Also, if you type ActiveConnection in the help search you get a
very complete explanation. Click on Visual Basic Example at the bottom to
see the code for accessing ADP tables with VB code.
 
M

MarcVS

This also gives an error:

'Cannot update the data. The database or the object is read-only'

Marc
 
M

MarcVS

Roy,

I don't find the topic CurrentDB in ADP.

Is this an old message. The oldest message I can see is from 18/05/2006...

Also when I typ ActiveConnection in the Access help (Version 2003) I only
find something about replication.

Marc
 
S

Sylvain Lafontaine

He's probably talking about making a search on Google. See:

http://groups.google.ca/group/micro...=currentdb&qt_g=1&searchnow=Search+this+group

In your case, it's not clear if you have upsized to an ADP project (which
doesn't use DBEngine by default) or to a MDB file with linked tables (which
still use DBEngine as its main engine). If you are in the later case, then
you should post in a more appropriate newsgroup as this one is about a ADP,
not MDB.
 
A

aaron.kempf

Alex;

don't use DAO for christ sakes

ADO is BETTER in that you don't need to re-write your data access layer
if and when you change databases.. you just need to change a
connectionstring

-Aaron
 

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