473,320 Members | 1,950 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" );
Nov 12 '05 #1
6 1318
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" );

Nov 12 '05 #2
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)
Nov 12 '05 #3
> 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
Nov 12 '05 #4
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
Nov 12 '05 #5
"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)
Nov 12 '05 #6
Thank you very much for your help.

This line is all that was needed.

AccessApp.UserControl = true;

Do you know of a good reference for these methods?

Thanks again.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '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...
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...
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...
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...
2
by: UofM Programmer | last post by:
I have tried almost every suggestion in these posts and my asp/vb .net application still cannot launch a new browser window. Using WinXP task manager, the best I can see is the start of a iexplore...
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
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.