Previous Thread

8/15/2006 4:23:41 PM    Problem after upsizing
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



8/15/2006 8:42:20 PM    Re: Problem after upsizing
Hi, 
 
if this is a linked table - then you can open it using: 
 
DB.OpenRecordset("Name_Of_Table", dbOpenDynaset) 
 
or, if your table has identity column - then 
 
DB.OpenRecordset("Name_Of_Table", dbOpenDynaset, dbSeeChanges) 
 
-- 
 
Best regards, 
 
___________ 
 
Alex Dybenko (MVP) 
 
http://alexdyb.blogspot.com 
 
http://www.PointLtd.com 
 
"MarcVS" <Marc.VanSchandevijl@-removethis-.ping.be> wrote in message 
 
news:uqPnpZHwGHA.4576@TK2MSFTNGP03.phx.gbl...

8/16/2006 2:53:19 PM    Re: Problem after upsizing
This also gives an error: 
 
'Cannot update the data. The database or the object is read-only' 
 
Marc 
 
"Alex Dybenko" <alexdyb@PLEASE.cemi.NO.rssi.SPAM.ru> schreef in bericht 
 
news:%23d1FDnIwGHA.4512@TK2MSFTNGP05.phx.gbl...

8/16/2006 7:02:17 PM    Re: Problem after upsizing
Hi, 
 
make sure that your table has primary key - if no - then make one and relink 
 
it again 
 
-- 
 
Best regards, 
 
___________ 
 
Alex Dybenko (MVP) 
 
http://alexdyb.blogspot.com 
 
http://www.PointLtd.com 
 
"MarcVS" <Marc.VanSchandevijl@-removethis-.ping.be> wrote in message 
 
news:OL852LTwGHA.4216@TK2MSFTNGP06.phx.gbl...