PC Review


Reply
Thread Tools Rate Thread

Check if database is readonly?

 
 
Boss
Guest
Posts: n/a
 
      24th Jun 2009

Hi,

I am looking for a code which would open database in readonly mode by default.

Else... Some code whcih can tell the database is in which mode (Readonly,
exclusive, normal) etc

Thanks!
Boss
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      25th Jun 2009

"Boss" <(E-Mail Removed)> wrote in message
news:5F5933CE-6133-4A5B-BEA9-(E-Mail Removed)...
> Hi,
>
> I am looking for a code which would open database in readonly mode by
> default.


You could create a shortcut to start Access and open the database while
specifying the /ro command-line option.

> Else... Some code whcih can tell the database is in which mode (Readonly,
> exclusive, normal) etc


Although I haven't tested this comprehensively, I believe you could check
the Updatable property of the database object returned by CurrentDb. As in:

If CurrentDb.Updatable Then
' the database is not read-only
Else
' the database is read-only
End If

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
Boss
Guest
Posts: n/a
 
      26th Jun 2009

Excellent..!!

I was trying to something like thsi but using wrong function of
me.recordset...

Thanks a lot for your help... you made my day...

Thx!
Boss

"Dirk Goldgar" wrote:

> "Boss" <(E-Mail Removed)> wrote in message
> news:5F5933CE-6133-4A5B-BEA9-(E-Mail Removed)...
> > Hi,
> >
> > I am looking for a code which would open database in readonly mode by
> > default.

>
> You could create a shortcut to start Access and open the database while
> specifying the /ro command-line option.
>
> > Else... Some code whcih can tell the database is in which mode (Readonly,
> > exclusive, normal) etc

>
> Although I haven't tested this comprehensively, I believe you could check
> the Updatable property of the database object returned by CurrentDb. As in:
>
> If CurrentDb.Updatable Then
> ' the database is not read-only
> Else
> ' the database is read-only
> End If
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
check if datbase is in readonly mode Boss Microsoft Access VBA Modules 1 24th Jun 2009 02:46 PM
Check for ReadOnly File is in Use Mayur H Chauhan Microsoft VB .NET 3 12th May 2008 04:05 PM
readonly database SF Microsoft Access 2 13th Mar 2006 05:07 AM
Detect readonly database =?Utf-8?B?Q2hhcmxlcyBUYW0=?= Microsoft Access Form Coding 1 17th Mar 2005 05:05 AM
set ReadOnly to radio button and check box Grey Microsoft ASP .NET 1 31st May 2004 11:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:28 AM.