473,480 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to detect if current directory is on a CD

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
3 1724
"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
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
.... 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
107039
by: Daniel | last post by:
How do you get the current directory of the actual .exe file (not the file name but the directory it is in) ? These do not work: System.IO.Directory.GetCurrentDirectory() - returns system...
1
8673
by: Tee | last post by:
Hi, question as subject, can we detect a folder existence on the server ... and another question, how to know current application folder ? thanks, Tee
1
5343
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
4
3136
by: Jim Renton | last post by:
Hi everyone How do you detect if directory exist and if it doesn’t how do you create one Thank Ji
3
7096
by: Asterbing | last post by:
Since the "on fly addition..." thread has taken another direction, I'm opening a new one to be more explicit and recenter the subject. Well, the subject is to detect when a document is well...
2
2364
by: Maciej Bliziński | last post by:
Hello Pythonists, I'd like to write for myself a tiny program that counts time spent on each virtual desktop (in GNOME). In order to do that, I need my program to detect the current virtual...
2
2073
by: Kamilche | last post by:
''' DetectUnusedModules.py - Detect modules that were imported but not used in a file. When run directly, this class will check all files in the current directory. ''' import os import...
4
3662
by: Uldis Bojars | last post by:
Hi! How can Javascript code detect if a user has been authenticated to see a page, that is, if he has entered a username and password for HTTP authentification to see the current page. Possibly...
3
3176
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
0
7044
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7087
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6944
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4782
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.