Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Cannot find file ..."

Status
Not open for further replies.

JacenLaw

Programmer
Feb 14, 2006
2
DE
Hi there :)

I have a client and server application. On startup, the client reads some entries within a table called "Einstellungen" out of a given .MDB-file that always exists.

Everything's working fine... if the file isn't "Read Only". I don't want people from changing anything on the server, so I want to set it Read-Only, because the permissions don't work like I want (if I set them on the server only, Clients are still able to modify, add and delete entries o_O).

As soon as the file is "Read Only", the client moans, that the file cannot be found (well, but it's still there).

here's the code that causes the error:

--------------------------------
Code:
sql = "SELECT e1.value as k1, e2.value as k2, e3.value as k3 FROM Einstellungen as e1, Einstellungen as e2, Einstellungen as e3 IN '" & serverPath & "' WHERE e1.key='version_major' AND e2.key='version_minor' AND e3.key='version_mini'"
    
Set rs = CurrentDb.OpenRecordset(sql)
--------------------------------

The OpenRecordset gives the error "Cannot find file ...". I checked the path 3 times, I even used the Windows Explorer to check it for correctness and I took a look for spaces 'n stuff. There's nothing wrong. The whole SQL-string is correct.

Does anybody know a tip or probably a trick how to solve this "Read Only"-thingy?

Thanks for reading and help you may give!

Yours,
Jacen
 
I forgot to mention that if I run it again without closing Access (or if I just close MY program and reopen it), it works without any errors, so Access suddenly finds the file (which is still the same string).

I am using Access 2003.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top