By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,573 Members | 3,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,573 IT Pros & Developers. It's quick & easy.

How to detect if current directory is on a CD

P: n/a
Hi;

I have a DBS that that generates some javasript and allows the user to
alter table contents.

If the database is being executed on a CD/DVD how can I tell is the
current directory is unwritable from within the Access VB module?

Regards
Ian

Jul 22 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"ip*****@pipemedia.co.uk" <ip*****@pipemedia.co.ukwrote in message
<11*********************@i42g2000cwa.googlegroups. com>:
Hi;

I have a DBS that that generates some javasript and allows the user
to alter table contents.

If the database is being executed on a CD/DVD how can I tell is the
current directory is unwritable from within the Access VB module?

Regards
Ian
I would probably work with some of the objects, methods and properties
of the filesystemobject.

With a reference to Microsoft Scripting Runtime, you should be able to
do something like this

dim fs as scripting.filesystemobject
dim dr as scripting.drive

set fs = new scripting.filesystemobject
' or late bind, and use
' set fs = createobject("scripting.filesystemobject")
set dr = fs.getdrive(strYourDrive) ' currentproject.path

debug.print dr.drivetype

Drivetype 4, I think, is CD/DVD.

Usage of the scripting libaries, are frowned upon in these newsgroups,
I think, due to scripting being disabled by some, and I think this
http://www.mvps.org/access/api/api0003.htm is more PC ;-)

--
Roy-Vidar
Jul 22 '06 #2

P: n/a
On 22 Jul 2006 05:23:05 -0700, ip*****@pipemedia.co.uk wrote:

A simple way would be to try to create a small file, and handle the
runtime error that is thrown when it fails.
-Tom.

>Hi;

I have a DBS that that generates some javasript and allows the user to
alter table contents.

If the database is being executed on a CD/DVD how can I tell is the
current directory is unwritable from within the Access VB module?

Regards
Ian
Jul 22 '06 #3

P: n/a
.... which more generically answers the question the OP really needs to know
which is "can I write to disc in the current folder".

--

Terry Kreft
"Tom van Stiphout" <no*************@cox.netwrote in message
news:8q********************************@4ax.com...
On 22 Jul 2006 05:23:05 -0700, ip*****@pipemedia.co.uk wrote:

A simple way would be to try to create a small file, and handle the
runtime error that is thrown when it fails.
-Tom.

Hi;

I have a DBS that that generates some javasript and allows the user to
alter table contents.

If the database is being executed on a CD/DVD how can I tell is the
current directory is unwritable from within the Access VB module?

Regards
Ian

Jul 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.