Link to home
Start Free TrialLog in
Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America

asked on

Security Issue on TransferDatabase object

I currently have an mdb that extracts using transferDatabase 2 tables that are originally ODBC connected tables.

I am importing this data, then compacting the mdb and zipping then giving the user the opportunity to copying to the users local machine via an email html link.

However, when the users opens the copied unzipped mdb - and then tries to open the 2 tables - this is where is where the security issue develops.  

"Could not read definitions; no read definitions permissions for table or query "Table1"

What am I doing wrong?

Karen
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi kfschaefer1,
So have you applied Access security to the application?
It looks like you have not made the correct settings for security on new objects.(New Tables, New Queries etc)

Pete
Avatar of Karen Schaefer

ASKER

No Access Security has been set.  I did not create a mda or mdw.

The impression I get is that this may be an ODBC issue.

Karen
When I open the mdb in its original location - the zipped file - iff I unzip it in the originial location - I am able to open the tables in quesitons - it is after the user saves it to the MY Document folder that I have an issue -.

I checked and the file is shared and not exclusive  - the problem is with just the imported tables. I even imported a table directly into the new My Document version and I am still unable to open it - it did import completely.

What is going on?
K
Never heard of anything like this.
I would still suggest you look at the permissions on the tables in Tools>Security>User and Group Permissions although based on what you say it doesn't sound like you will find a problem there.

Are you able to copy  and paste these tables within the problem database - can you open the copies?

Pete
Karen, when u say u imported them

was it a proper import or a link?

If a link, could it be that the ODBC DSN u have is not on there's?


Another possibility is the database has got corrupt somehow. I doubt it but its worth a check. The MDB file that the user has, have u tried opening that on your PC? does it work?

Turns out it was either a corrupt file or it was due to the fact that the file was opened from the zip file and the file was not extracted properly- acting as if it was on a CD so of course it was read only.

The reason for the imported file is so my users do not have to worry about the ODBC connections and they can do what they want to their copy of the mdb.

Thanks for the assistance.

Karen
Well that makes sense then
Did u test the zip file u sent and extract and try the contents on your PC?
Im saying the DB inside the zip may of been corrupted when u created it

Regarding the zip file is there a way to zip the file and not pass along the numerous files(layers it is stored in)?

ie.  file1\file2\file3\file4\filename - it is stored here, however when they saves as to their c:\MY Documents - this zip file should read only the "filename" - my users do not want to drill down thru a group of folders to find the actual file.

What is the work around this.

I am using s ShellWait( to execute the c:\ "sourcefiled", zip.exe "targetFile"

Thanks,

Karen
Have u the parameters for zip.exe ?
there may be one that says not to store fullpath

try in dos window

zip.exe /?

or something

have u a website for zip.exe? I can have a look and see whats there
Karen, instead of phaffing about here
why dont u do this

copy your DB into a directory under C:\

get your users to create a predefined directory (or zip.exe might do it automatically, I dont know)

say

C:\KarenUpdates

then u have the same dir, put your zip in there and zip that
so when they extract, they extract in the same dir

if u want to script this, a very easy to use scripting tool is called NSIS. Its free and u can make an exe which can ship your DB etc
can't copy to local drive because it is stored on a server due to the fact that the user will access via a link within an email that references a place on a server.

What happens is I have a dummy mdb. that runs code that needs to find the zipped file and allows the user to copying the zipped file to their local machine.  It is after the copying to their local machine that they need to extract the file to their local pc.

It is here that I would prefer the user to see only the actual zipped mdb and not the loads of file folders that they would have to drill down to to find the actual mdb.  

is there a workaround.  Also, due to security issues I can not use thirdparty tools. the code I am using works great - I just need to modify the stored zip path.

Function zipfiles()
Dim source As String
Dim target As String

   
    source = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.mdb"
    target = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.zip"
    ShellWait "C:\temp\zip.exe """ & target & """ """ & source & """"
 End Function

k
Karen, without knowing the parameters available to zip.exe, and it seems by default directories are added

Is this the zip u are using?
http://www.info-zip.org/pub/infozip/Zip.html

I had a look, and there seems an option called -D

-D     Do not create  entries  in  the  zip  archive  for  directories.
              Directory   entries   are  created  by  default  so  that  their
              attributes can be saved in the  zip  archive.


did u try going into dos?
e.g  start, run, cmd
then in the doswindow, run zip.exe
does it come up with anything?
yes the dos - does retun a list.

which part of my code do I ut the option.

ShellWait "-d, C:\temp\zip.exe """ & target & """ """ & source & """"
k
and was -D part of it?

if so, or if not but u read the list and found a parameter u do this


ShellWait "-C:\temp\zip.exe -D """ & target & """ """ & source & """"


What do I need to change:

Function zipfiles()
Dim source As String
Dim target As String

   
    source = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.mdb"
    target = "\\Wabelhdk0215892\Intranet Information Server\CorePlan\Manual PLANIT Forecast For Scrubbing.zip"
    ShellWait "C:\temp\zip.exe """ & target & """ """ & source & """"
 End Function

New path for the final location c:\my documents\Manual PLANIT Forecast For Scrubbing.zip  this is what I want the user to see when they click on the extracting file.

Thanks,

Karen
Thanks for your assistance.  I was unable to get it to work.

I decided that the file will always be small enough that I can just copy the mdb without zipping.  Thanks,

Karen
I suggest you post a question in Community Support to close this then
Glad u finally got a solution though
If we had that zip.exe, or where we could download it, that might of helped possibly
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial