0
votes

Firstly I looked up every OleDbException "Disk or network error" topics but nothing solved my problem. Im developing a program for my office on Windows Forms and using access database. When I test the program in local everything is fine(db is in the local computer). But when I moved up the database into the shared folder (office server) , its starting to throw Disk or Network Error while connecting to db(not every connection).

  1. I can read user table data (it means select command working)
  2. But i cant read hours table data (but sth is wrong)
  3. I can add new hours to table (insert command working)
  4. But i cant add a new user (sth is wrong as well)

Connection String:

OleDbConnection db = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\Ug_Filesrv\Ug_Proje$\0140_SAU_CAE_Library\FOKS Database\FOKS_Database.mdb;Jet OLEDB:Database Password=123456;");

Error İmage

Note: I cant change the database type , only access Database allowed.

Any help needed. Thank you.

1
Source is "\UG_Filesrv" sure thats not "\\UG_Filesrv" .. using access over UNCs probably isnt the best idea.BugFinder
is this database shared with multiple users? If so its most likely multiple users accessing it at the same time as this is only a file on disk when you write to it it gets locked for other users.Rafal
Have you tried adding <identity impersonate="true" username="user" password="password" /> in your web.config?Dungeon
1-) yeah its \\UG ... (miss-copy), I understand but have to use Access :( BugFindersehzade
2-) yeah its shared for multiple users , and also Im the only one who is using the system for now , but thank you . Rafalsehzade

1 Answers

0
votes

Solved !!!

Have you tried adding

<identity impersonate="true" username="user" password="password" />

in your web.config? By Dungeon