473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ 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 1733
"ip*****@pipeme dia.co.uk" <ip*****@pipeme dia.co.ukwrote in message
<11************ *********@i42g2 000cwa.googlegr oups.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 filesystemobjec t.

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

dim fs as scripting.files ystemobject
dim dr as scripting.drive

set fs = new scripting.files ystemobject
' or late bind, and use
' set fs = createobject("s cripting.filesy stemobject")
set dr = fs.getdrive(str YourDrive) ' 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*****@pipemed ia.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.c om...
On 22 Jul 2006 05:23:05 -0700, ip*****@pipemed ia.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
107047
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 directory not current directory of .exe System.Environment.CurrentDirectory - returns system directory not current directory of .exe System.Reflection.Assembly.GetExecutingAssembly().Location - returns the file name of the current binary
1
8678
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
5372
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 completely/succsessfully on the client's computer before updating some metadata on the server (file downloaded date for instance) However, All examples i have tried, and all examples I have found that other people says works - doesn't work for me :-(
4
3156
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
7117
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 loaded inside an iframe, knowing this document is CGI generated and that I can't modify the CGI itself (ie. add an onload event in the document body). All is said in the three HTML file I've copied below. Just create the three in same directory,...
2
2372
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 desktop. I've googled for it for about one hour and couldn't find any solution. The closest thing I found is set of tutorials: http://www.pygtk.org/articles.html Unfortunately, none of them answers my questions: How to detect current virtual...
2
2079
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 tokenize
4
3677
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 that can be determined from the HTTP request header, but how to access this data for the current page in Javascript? Plus: how can it detect if the current page is encrypted? Is looking at the protocol ( https:// ) enough to determine this?
3
3183
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 directory (os.curdir) was on sys.path. In 2.5, it appears to be the base directory of the running script. For example, if you execute the file testme.py in your current working directory, '' is on sys.path. If you execute c:\Python25\Scripts\testme.py,...
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8065
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8280
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6739
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5882
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3907
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3955
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2434
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 we have to send another system

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.