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

G

Guest

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!
 
G

Guest

try
Connection to SQL server
Catch
Response.Redirect("MSAccessPage.aspx")
'will change the browser window display to the application that uses access
Finally
'clean up the sql connection variables
 
G

Guest

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\Member.mdb

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

response.Redirect("c:\Membership\Member.mdb") ???

Thanks.
 
G

Guest

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.
 
G

Guest

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/issues/02/06/rich/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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top