473,836 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opening a MS Access APP - if the SQL connection is not found...

I have two versions of a 'Downtime Application that will run in the event
that the mainframe goes down
1) SQL Server ASP.NET app (accessed outside the mainframe network)
2) MS Access Version of the same app locally installed (C Drive)
Can someone help me with the 'Catch' part of this code in VB.NET?

Pseudo code

Try...
connection to SQL sever

Catch
- if the connection is not valid
- open the local MS Access Front end - Version of this application
- close the browser window

Finally
- close the connection to SQL if there was one..
Thanks so much!
Jan 17 '06 #1
6 1693
try
Connection to SQL server
Catch
Response.Redire ct("MSAccessPag e.aspx")
'will change the browser window display to the application that uses access
Finally
'clean up the sql connection variables

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
I have two versions of a 'Downtime Application that will run in the event
that the mainframe goes down
1) SQL Server ASP.NET app (accessed outside the mainframe network)
2) MS Access Version of the same app locally installed (C Drive)
Can someone help me with the 'Catch' part of this code in VB.NET?

Pseudo code

Try...
connection to SQL sever

Catch
- if the connection is not valid
- open the local MS Access Front end - Version of this application
- close the browser window

Finally
- close the connection to SQL if there was one..
Thanks so much!

Jan 17 '06 #2
Actually the app front end for Access is Access, not an ASP.NET page, so I
was looking for some sort of a shell call just to open that specific file -
example: C:\Membership\M ember.mdb

(I'm just beginning with ASP.NET so I'm not certain of even a simple call
like this..)

response.Redire ct("c:\Membersh ip\Member.mdb") ???

Thanks.

"Phillip Williams" wrote:
try
Connection to SQL server
Catch
Response.Redire ct("MSAccessPag e.aspx")
'will change the browser window display to the application that uses access
Finally
'clean up the sql connection variables

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
I have two versions of a 'Downtime Application that will run in the event
that the mainframe goes down
1) SQL Server ASP.NET app (accessed outside the mainframe network)
2) MS Access Version of the same app locally installed (C Drive)
Can someone help me with the 'Catch' part of this code in VB.NET?

Pseudo code

Try...
connection to SQL sever

Catch
- if the connection is not valid
- open the local MS Access Front end - Version of this application
- close the browser window

Finally
- close the connection to SQL if there was one..
Thanks so much!

Jan 17 '06 #3
Hi Jonefer,

Running an MS Office component (such as MS Access) through the web means
that the user downloads the database and then run it on their desktop. Here
is an article I found when searching the MSDN that might help you:
http://msdn.microsoft.com/library/de.../deploydap.asp

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
Actually the app front end for Access is Access, not an ASP.NET page, so I
was looking for some sort of a shell call just to open that specific file -
example: C:\Membership\M ember.mdb

(I'm just beginning with ASP.NET so I'm not certain of even a simple call
like this..)

response.Redire ct("c:\Membersh ip\Member.mdb") ???

Thanks.

"Phillip Williams" wrote:
try
Connection to SQL server
Catch
Response.Redire ct("MSAccessPag e.aspx")
'will change the browser window display to the application that uses access
Finally
'clean up the sql connection variables

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
I have two versions of a 'Downtime Application that will run in the event
that the mainframe goes down
1) SQL Server ASP.NET app (accessed outside the mainframe network)
2) MS Access Version of the same app locally installed (C Drive)
Can someone help me with the 'Catch' part of this code in VB.NET?

Pseudo code

Try...
connection to SQL sever

Catch
- if the connection is not valid
- open the local MS Access Front end - Version of this application
- close the browser window

Finally
- close the connection to SQL if there was one..
Thanks so much!

Jan 18 '06 #4
Phillip,

Thank you for doing that research, but I guess I have not done sucha great
job communicating my scenario.

The way that I am attempting to deploy this backup is through 2 lines of
defense.
the first one, we already know is the ASP.NET app where the user will access
that interface via the browser.

The 2nd line of defense will be (In the same installation package) to have
an Access MDB (encrypted) that resides on each users local machine. This
will be installed to each user's computer.

So the way I want my Web App to work will be to
1) try connecting to the SQL Server - in which case - if it does - Open the
ASP.NET application...

IF it doesn't see the server (the server must be down)

2) ...open the Access MDB that is on their laptop (I don't mean view it in
the browser either - I have written an Access MDB front end version that has
the same interface as the ASP.NET application, but it is a forms application
- so at that point, I would like it to run like one) - I could have gone and
created an ASP page that points to the local MDB, but I figured - why write
that if I already created the prototype in MS Access?

All I need is the syntax for starting a shelled application from the browser
and then for closing down a web app after a local application is started.

Thanks again.

"Phillip Williams" wrote:
Hi Jonefer,

Running an MS Office component (such as MS Access) through the web means
that the user downloads the database and then run it on their desktop. Here
is an article I found when searching the MSDN that might help you:
http://msdn.microsoft.com/library/de.../deploydap.asp

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
Actually the app front end for Access is Access, not an ASP.NET page, so I
was looking for some sort of a shell call just to open that specific file -
example: C:\Membership\M ember.mdb

(I'm just beginning with ASP.NET so I'm not certain of even a simple call
like this..)

response.Redire ct("c:\Membersh ip\Member.mdb") ???

Thanks.

"Phillip Williams" wrote:
try
Connection to SQL server
Catch
Response.Redire ct("MSAccessPag e.aspx")
'will change the browser window display to the application that uses access
Finally
'clean up the sql connection variables

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:

> I have two versions of a 'Downtime Application that will run in the event
> that the mainframe goes down
> 1) SQL Server ASP.NET app (accessed outside the mainframe network)
> 2) MS Access Version of the same app locally installed (C Drive)
>
>
> Can someone help me with the 'Catch' part of this code in VB.NET?
>
> Pseudo code
>
> Try...
> connection to SQL sever
>
> Catch
> - if the connection is not valid
> - open the local MS Access Front end - Version of this application
> - close the browser window
>
> Finally
> - close the connection to SQL if there was one..
>
>
> Thanks so much!

Jan 18 '06 #5
Hi Jonefer,

There is no ASP.NET syntax to cause the browser to launch an executable
outside of its security context on the user’s desktop. Imagine the damage
that could happen if the browser were to allow a page you visit on the web to
launch Outlook or Word on your desktop.

You can however write a managed code (let’s say a winform application in
VB.NET) that, if trusted by the user, can be downloaded from your website to
launch the MS Access on the user’s desktop. (If this interests you, you
might look at this link that explains further how to set up security for such
scheme: http://msdn.microsoft.com/msdnmag/is...h/default.aspx)

But I think that you would be much better off, if you simply redirect the
user to an HTML page that instructs them to launch the MS Access application
by hand. Give them detailed instruction on how to do it and whom to call for
support. This would be much safer and makes the user aware of what is
happening to their data updates.

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
Phillip,

Thank you for doing that research, but I guess I have not done sucha great
job communicating my scenario.

The way that I am attempting to deploy this backup is through 2 lines of
defense.
the first one, we already know is the ASP.NET app where the user will access
that interface via the browser.

The 2nd line of defense will be (In the same installation package) to have
an Access MDB (encrypted) that resides on each users local machine. This
will be installed to each user's computer.

So the way I want my Web App to work will be to
1) try connecting to the SQL Server - in which case - if it does - Open the
ASP.NET application...

IF it doesn't see the server (the server must be down)

2) ...open the Access MDB that is on their laptop (I don't mean view it in
the browser either - I have written an Access MDB front end version that has
the same interface as the ASP.NET application, but it is a forms application
- so at that point, I would like it to run like one) - I could have gone and
created an ASP page that points to the local MDB, but I figured - why write
that if I already created the prototype in MS Access?

All I need is the syntax for starting a shelled application from the browser
and then for closing down a web app after a local application is started.

Thanks again.

"Phillip Williams" wrote:
Hi Jonefer,

Running an MS Office component (such as MS Access) through the web means
that the user downloads the database and then run it on their desktop. Here
is an article I found when searching the MSDN that might help you:
http://msdn.microsoft.com/library/de.../deploydap.asp

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
Actually the app front end for Access is Access, not an ASP.NET page, so I
was looking for some sort of a shell call just to open that specific file -
example: C:\Membership\M ember.mdb

(I'm just beginning with ASP.NET so I'm not certain of even a simple call
like this..)

response.Redire ct("c:\Membersh ip\Member.mdb") ???

Thanks.

"Phillip Williams" wrote:

> try
> Connection to SQL server
> Catch
> Response.Redire ct("MSAccessPag e.aspx")
> 'will change the browser window display to the application that uses access
> Finally
> 'clean up the sql connection variables
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "jonefer" wrote:
>
> > I have two versions of a 'Downtime Application that will run in the event
> > that the mainframe goes down
> > 1) SQL Server ASP.NET app (accessed outside the mainframe network)
> > 2) MS Access Version of the same app locally installed (C Drive)
> >
> >
> > Can someone help me with the 'Catch' part of this code in VB.NET?
> >
> > Pseudo code
> >
> > Try...
> > connection to SQL sever
> >
> > Catch
> > - if the connection is not valid
> > - open the local MS Access Front end - Version of this application
> > - close the browser window
> >
> > Finally
> > - close the connection to SQL if there was one..
> >
> >
> > Thanks so much!

Jan 19 '06 #6
Thank you humoring my beginner questions. That was a nice thorough answer
and exactly what I was looking for.

The suggestion about downloading a winform application would not work - as
the server is assumed to be down at that point.

I like the idea of posting a page with instructions.

Maybe what I'll do is install the winform application to check for the SQL
server connection and then launch the web page or the Access MDB, depending
on what is available.


"Phillip Williams" wrote:
Hi Jonefer,

There is no ASP.NET syntax to cause the browser to launch an executable
outside of its security context on the user’s desktop. Imagine the damage
that could happen if the browser were to allow a page you visit on the web to
launch Outlook or Word on your desktop.

You can however write a managed code (let’s say a winform application in
VB.NET) that, if trusted by the user, can be downloaded from your website to
launch the MS Access on the user’s desktop. (If this interests you, you
might look at this link that explains further how to set up security for such
scheme: http://msdn.microsoft.com/msdnmag/is...h/default.aspx)

But I think that you would be much better off, if you simply redirect the
user to an HTML page that instructs them to launch the MS Access application
by hand. Give them detailed instruction on how to do it and whom to call for
support. This would be much safer and makes the user aware of what is
happening to their data updates.

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:
Phillip,

Thank you for doing that research, but I guess I have not done sucha great
job communicating my scenario.

The way that I am attempting to deploy this backup is through 2 lines of
defense.
the first one, we already know is the ASP.NET app where the user will access
that interface via the browser.

The 2nd line of defense will be (In the same installation package) to have
an Access MDB (encrypted) that resides on each users local machine. This
will be installed to each user's computer.

So the way I want my Web App to work will be to
1) try connecting to the SQL Server - in which case - if it does - Open the
ASP.NET application...

IF it doesn't see the server (the server must be down)

2) ...open the Access MDB that is on their laptop (I don't mean view it in
the browser either - I have written an Access MDB front end version that has
the same interface as the ASP.NET application, but it is a forms application
- so at that point, I would like it to run like one) - I could have gone and
created an ASP page that points to the local MDB, but I figured - why write
that if I already created the prototype in MS Access?

All I need is the syntax for starting a shelled application from the browser
and then for closing down a web app after a local application is started.

Thanks again.

"Phillip Williams" wrote:
Hi Jonefer,

Running an MS Office component (such as MS Access) through the web means
that the user downloads the database and then run it on their desktop. Here
is an article I found when searching the MSDN that might help you:
http://msdn.microsoft.com/library/de.../deploydap.asp

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"jonefer" wrote:

> Actually the app front end for Access is Access, not an ASP.NET page, so I
> was looking for some sort of a shell call just to open that specific file -
> example: C:\Membership\M ember.mdb
>
> (I'm just beginning with ASP.NET so I'm not certain of even a simple call
> like this..)
>
> response.Redire ct("c:\Membersh ip\Member.mdb") ???
>
> Thanks.
>
> "Phillip Williams" wrote:
>
> > try
> > Connection to SQL server
> > Catch
> > Response.Redire ct("MSAccessPag e.aspx")
> > 'will change the browser window display to the application that uses access
> > Finally
> > 'clean up the sql connection variables
> >
> > --
> > HTH,
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> >
> >
> > "jonefer" wrote:
> >
> > > I have two versions of a 'Downtime Application that will run in the event
> > > that the mainframe goes down
> > > 1) SQL Server ASP.NET app (accessed outside the mainframe network)
> > > 2) MS Access Version of the same app locally installed (C Drive)
> > >
> > >
> > > Can someone help me with the 'Catch' part of this code in VB.NET?
> > >
> > > Pseudo code
> > >
> > > Try...
> > > connection to SQL sever
> > >
> > > Catch
> > > - if the connection is not valid
> > > - open the local MS Access Front end - Version of this application
> > > - close the browser window
> > >
> > > Finally
> > > - close the connection to SQL if there was one..
> > >
> > >
> > > Thanks so much!

Jan 19 '06 #7

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

Similar topics

0
1543
by: John Winterbottom | last post by:
Does anyone know if this is possible? We are running Access XP with Windows XP Prof.. We have an ADP file we are using to print custom reports for a client. It's opened and conntrolled through automation, and we've had cases when the file was shut down unexpectedly and our normal disconnection code doesn't run. The next time the calling app tries to open the file, the connection dialog pops up. Users can't even click it away or enter a...
3
14176
by: Atif | last post by:
Hi I am using MS Access 2000 and want to open the Schema to know about Table's structures like column names, data types, primary keys etc. In SQL Server, we use OpenSchema method of Connection object, in Oracle, we use "desc table" query, in MySQL, we use "describe table" query, in MS Access, we use ???????.
3
8901
by: Giuseppe D'Elia | last post by:
Hi there, I got a problem using an MS Access database through ASP.NET. After updating my system from .NET Framework 1.0 to 1.1, my existing application gives me the following error when opening a connection with the code below:
7
2947
by: mfeingold | last post by:
I am working on a system, which among other things includes a server and a ..net control sitting in an html page and connected to the server. I ran into a couple of problems, you guys might have some insight about. 1) It takes 20 sec or so to open a tcp socket from the client to the server. It just sits in the TcpClient.conect waiting for something. When I run the same control from a windows application it connects right away and works...
5
2035
by: Burton Roberts | last post by:
When using ASP.NET and an OleDBConnection control I get this error on CNN.Open: "The Microsoft Jet database engine cannot open the file 'C:\A2K\Backups\EdsBe2K.mdb'. It is already opened exclusively by another user, or you need permission to view its data." I have tried using a connection string, too, to no avail. However, when I am in Windows Forms I have no problem opening the same file
16
1344
by: Mr. B | last post by:
VB.net 2003; MS Access db; Netframe 1.1 I wrote an Windows app for my last place of employment that opened and modified a couple of MS Access db files. I did most of my programming at home on Drive "C". And I used the Drag/Drop Data Items to create the Connection, DataSet and DataAdapters. The Access files were located on drives "P" and "S" at work, so I had VB.net installed on my work PC so I could change the drives in the...
1
3687
by: CJJ | last post by:
hi Folks, I am opening my access database file (Access 2003) from a C# application. The connection string specifies mode=Share Exclusive The intent is that the application have exclusive access to the database file. No other instance of MS Access or this particular C# application (or any other app) should be able to open the access database file concurrently.
18
9159
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft page "How to: Connect to Data in an Access Database"
4
2469
by: kessa | last post by:
Hi Guys, I've recently had a problem with my site displaying a "system resources exceeded" error message ... and whilst searching this site for a solution (which I think I've now found) I came across mention of closing database connections and so had a "best practice" question which I hoped someone might be able to help me with? I'm a .asp newbie and much of what I have learnt has been done by looking at various snippets of code on the web...
0
9825
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9672
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,...
0
10559
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10601
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
10260
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
9388
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 projectplanning, coding, testing, and deploymentwithout 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...
0
6981
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
5829
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3116
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.