Solved

Why does Access DB accessed via ASP comes up on server instead of client?

Posted on 2006-10-25
6
271 Views
Last Modified: 2010-04-16
Why does Access DB accessed via ASP comes up on server instead of client?

I have code:
Dim objAcc
Set objAcc=Server.CreateObject("Access.Application")
objAcc.Visible = true
objAcc.OpenCurrentDatabase "\\dev2\KeetacAccess\Lab2000.mdb"
objAcc.DoCmd.OpenForm "AdjustmentsFrm"

The form comes up alrifht but it comes up on the server.  I would like the db to come up on the client. What am I doing wrong?

Thank you.
0
Comment
Question by:msjodin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 17806655
msjodin,

Is this an intranet or over the Internet?  ASP is a server side app so the server would need to be able to access the client computer.  The browser would not allow this so it would have to be over a network connection.  If the server can access that client machine then what is the physical path?

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 1

Author Comment

by:msjodin
ID: 17806725
This web is an intranet with a network connection.

dcomcnfg for MS access application has identity set to the interactive user.
0
 
LVL 3

Accepted Solution

by:
royce2020 earned 400 total points
ID: 17808896
The trick here is to put the code in VB script inside a <script> tag if you want it to be run (and visable) on the client side. If you have it in your ASP code it will open on the server. For example, this will open on the server:

<%
Dim objAcc
Set objAcc=Server.CreateObject("Access.Application")
objAcc.Visible = true
objAcc.OpenCurrentDatabase "\\dev2\KeetacAccess\Lab2000.mdb"
objAcc.DoCmd.OpenForm "AdjustmentsFrm"
'More ASP here
%>
<HTML><Body></Body></HTML>

and this will open on the client:

<%
'more ASP here
%>
<HTML>
<head></head>
<SCRIPT Language="VBScript">
Set objAcc = CreateObject("Access.Application")
objAcc.Visible = true
objAcc.OpenCurrentDatabase "\\dev2\KeetacAccess\Lab2000.mdb"
objAcc.DoCmd.OpenForm "AdjustmentsFrm"
</script>
<body></body>
</HTML>
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 3

Expert Comment

by:royce2020
ID: 17808906
I've just realised that the client in this case would probibly need to be running IE and have a fairly low security setting.
0
 
LVL 1

Author Comment

by:msjodin
ID: 17811436
In the following code I get an Error: Object required: 'Server'

Is there a way to create Server.CreateObject("Access.Application") on the client or pass it from the server to the client?  WHen I set runat=server of course the Access form comes up on the server as when between <%  %>

<script language="VBScript">

set objAcc=Server.CreateObject("Access.Application")
objAcc.Visible = true
objAcc.OpenCurrentDatabase "\\dev2\KeetacAccess\Lab2000.mdb"
objAcc.DoCmd.OpenForm "AdjustmentsFrm"


'objAcc.Quit 'acQuitSaveNone
'set objAcc = Nothing
</script>
0
 
LVL 4

Assisted Solution

by:hclgroup
hclgroup earned 100 total points
ID: 17811976
Why are you using

set objAcc=Server.CreateObject("Access.Application")

As royce2020 said all you need is

Set objAcc = CreateObject("Access.Application")
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question