By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

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

P: n/a
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.

"Phillip Williams" wrote:
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

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

P: n/a
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\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.

"Phillip Williams" wrote:
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

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

P: n/a
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\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.

"Phillip Williams" wrote:
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

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

P: n/a
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\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.

"Phillip Williams" wrote:

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

P: n/a
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\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.
>
> "Phillip Williams" wrote:
>
> > 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
> >
> > --
> > 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 discussion thread is closed

Replies have been disabled for this discussion.