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
Post a Comment