c# - Identify If Access database having ReadOnly Permission -


  • for acccess database open message "this database has been opended read-only".

  • for db when connect using c#.net application oledbconnectio ..at time of updating query give error "operation must use updateable query."

  • i want prompt user if db opened readonly permission in access database.. how can add code in c#.net application identiy oledb database readonly permission.

thanks

you can use fileinfo

fileinfo f = new fileinfo(@"c:\mydb.accdb"); if (f.isreadonly) {     console.writeline("file read only"); } else {     console.writeline("file not read only"); } 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -