473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Launching Microsoft Access via javascript - Will not stay open

I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?

Thanks in advance.

My code;

var AccessApp = new ActiveXObject("Access.Application.10");
AccessApp.Visible = true;
AccessApp.OpenCurrentDatabase("c:\\case\\case.mdb" );
Jul 23 '05 #1
6 5110
Denis,

Just curious ----

("c:\\case\\case.mdb")

Why the double backslashes??

Steve
PC Datasheet
"Denis" <po*****@hotmail.com> wrote in message
news:89**************************@posting.google.c om...
I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?

Thanks in advance.

My code;

var AccessApp = new ActiveXObject("Access.Application.10");
AccessApp.Visible = true;
AccessApp.OpenCurrentDatabase("c:\\case\\case.mdb" );

Jul 23 '05 #2
PC Datasheet wrote:
<snip>

Please don't top post in comp.lang.javascript
Just curious ----

("c:\\case\\case.mdb")

Why the double backslashes??

<snip>

The backslash is the escape character in a javascript string literal, a
single backslash would serve to escape the character following it, but
would not be part of the resulting string itself. As is normal with
escape characters, to use the character literally it needs to be escaped
itself.

Richard.
Jul 23 '05 #3
po*****@hotmail.com (Denis) wrote in news:89ed8fde.0404151150.7dde0b05
@posting.google.com:
I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?

Thanks in advance.

My code;

var AccessApp = new ActiveXObject("Access.Application.10");
AccessApp.Visible = true;
AccessApp.OpenCurrentDatabase("c:\\case\\case.mdb" );


You've set a reference to the Access App. When the Javascript closes the
reference goes out of scope. Javascript is quite meticulous about garbage
collection. It releases the variable, and the Access application closes.

How to solve?

Well, if you run the code from an html file ... (hta would probably not get
you warnings) ... and leave that file open then your access app should stay
open.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Jul 23 '05 #4
> I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?

var AccessApp = new ActiveXObject("Access.Application.10");
AccessApp.Visible = true;
AccessApp.UserControl = true;
AccessApp.OpenCurrentDatabase("c:\\case\\case.mdb" );
--
Michael Harris
Microsoft.MVP.Scripting
Sammamish WA US
Jul 23 '05 #5
On Thu, 15 Apr 2004 20:14:33 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
"Denis" <po*****@hotmail.com> wrote in message
news:89**************************@posting.google. com...
I am trying to launch an .mdb file via javascript. I do not need to
do anything but open the application. It is able to open the
application but for some reason it opens and then closes. At first I
thought it may be a permission problem as far as writing the .ldb file
to disk, but I added every single user and gave them write permissions
to the folder and there is still no change.
Has anyone been able to get this to work?

Thanks in advance.

My code;

var AccessApp = new ActiveXObject("Access.Application.10");
AccessApp.Visible = true;
AccessApp.OpenCurrentDatabase("c:\\case\\case.mdb" );
Denis,

Just curious ----

("c:\\case\\case.mdb")

Why the double backslashes??

Steve
PC Datasheet


\ is the escape character in JScript strings and regular expressions.
IOW the character that follows the \ is treated as a literal character
and loses any special meaning it has (if any).

Regards,
Steve
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
Jul 23 '05 #6
"Michael Harris \(MVP\)" <mikhar at mvps dot org> wrote in
news:ug**************@TK2MSFTNGP12.phx.gbl:
AccessApp.UserControl = true;


Excellent. I didn't know about this property.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Ministry Of Jute | last post by:
I returned home from work today to find an Airborne Express Letter Express mailer leaning up against my apartment door. The return addressee was Microsoft Suite 300 1165 Eastlake Avenue E...
1
by: David | last post by:
Hello. I've written a page for an intranet that gives the user the option of launching a Word or PowerPoint document. The code I used to force the hyperlink to launch the application rather...
6
by: Denis | last post by:
I am trying to launch an .mdb file via javascript. I do not need to do anything but open the application. It is able to open the application but for some reason it opens and then closes. At...
2
by: Tim Stevens | last post by:
Hello, This is the first time I have had to resort to posting on here, as Ive always been able to find a solution to my problems in the past by browsing postings by others. So, to start with I...
6
by: sebastien | last post by:
Hi I have an asp.net application that use Session variables. What I want to do is to launch an second instance of this application by a link inside the first application. The problem is: when I...
7
by: dhussong | last post by:
I have created a Setup and Deployment project in Visual Studio.NET 2003. After my installation has completed running I'd like to launch the EXE that I just installed. I've found how to launch the...
0
by: microb0x | last post by:
Is there any difference in the way an Access .mdb file is launched from directly double-clicking the file through windows explorer versus using code within another Access file to launch the...
3
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be...
5
by: Oriane | last post by:
Hi there, I would like to run a javascript file directly from the desktop, like a VBScript file. So my post is perhaps "out of topic" in which case I apologize. The goal is to run this sort...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.