ms access - Re Share File on Network -


i use vb6 compactdatabase method compact .mdb (access db) file , have searched high , low way reapply share permissions on original db using vb6.

the compactdatabase code:

set jro = createobject("jro.jetengine") if isobject(jro)      jro.compactdatabase _         "provider=microsoft.jet.oledb.4.0;data source=" & sourcepath & _             ";jet oledb:database password=" & dbpassword, _         "provider=microsoft.jet.oledb.4.0;data source=" & tmppath & _             ";jet oledb:database password=" & dbpassword & _             ";jet oledb:encrypt database=true;jet oledb:engine type=5;" else     compactdb = "compact failed: mdac not installed correctly - missing jro.jetengine" end if 

this compacts new db , sequence delete original , rename new old.

problem new file not have original share permissions, set 'everyone' 'full control'. have found code on how set permissions on folders not directly files.

any appreciated.

for interested have found resolution.

in original code; using temp path "c:\temp" create new '.mdb' , copying on program files directory; inherited permissions of "temp" folder.

i changed temp file name in same directory current db , when process complete new .mdb has full permissions old.mdb. cheers


Comments