Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / January 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jonefer - 17 Jan 2006 21:28 GMT
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!
Phillip Williams - 17 Jan 2006 22:31 GMT
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

Signature

HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

> I have two versions of a 'Downtime Application that will run in the event
> that the mainframe goes down
[quoted text clipped - 17 lines]
>
> Thanks so much!
jonefer - 17 Jan 2006 23:05 GMT
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.

> try
>   Connection to SQL server
[quoted text clipped - 25 lines]
> >
> > Thanks so much!
Phillip Williams - 18 Jan 2006 21:17 GMT
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/default.asp?url=/library/en-us/dnacc2k2/html/d
eploydap.asp


Signature

HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

> 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  -
[quoted text clipped - 36 lines]
> > >
> > > Thanks so much!
jonefer - 18 Jan 2006 23:18 GMT
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.

> Hi Jonefer,
>
[quoted text clipped - 43 lines]
> > > >
> > > > Thanks so much!
Phillip Williams - 19 Jan 2006 00:03 GMT
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.

Signature

HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com

> Phillip,
>
[quoted text clipped - 75 lines]
> > > > >
> > > > > Thanks so much!
jonefer - 19 Jan 2006 00:31 GMT
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.

> Hi Jonefer,
>
[quoted text clipped - 94 lines]
> > > > > >
> > > > > > Thanks so much!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.