Hi Guys
I am using this code to execute an Access VBA function from ASP:
strDbName = strDataSource & "data\webjobs.m db"
Set objAccess = Server.CreateOb ject("Access.Ap plication")
objAccess.Visib le = False
objAccess.OpenC urrentDatabase strDbName
objAccess.Run "ASP_SkillSearc h", strTable, oUpload.Form("f irstname"),
oUpload.Form("s urname")
I have a few issues that i need to solve, any help would be greatly
appreciated:
1/ This code takes around 2+mins to run, so I would like the code to run and
for the webpage to be released immediately, so that they do not have to wait
for the code.
2/ I would like to do a similar thing that i do in VB6 (i am new to ASP)
which i would use this code for:
on error resume next
Set objAccess = Server.GetObjec t("Access.Appli cation")
If err = True then
Set objAccess =
Server.CreateOb ject("Access.Ap plication")
End if
Is it possible to check if a version of access is running, like above?
3/ I would like to check if the function within access that i am attempting
to execute is running already.
Sorry about the list of problems,
As i said before any help would be greatly appreciated.
Thanks Si 4 8198
Actually i have solved No Three, but any help with the rest would be great!!
Thanks Si
"Si" <no****@nospam. com> wrote in message
news:uN******** ******@TK2MSFTN GP10.phx.gbl... Hi Guys
I am using this code to execute an Access VBA function from ASP:
strDbName = strDataSource & "data\webjobs.m db" Set objAccess = Server.CreateOb ject("Access.Ap plication") objAccess.Visib le = False objAccess.OpenC urrentDatabase strDbName objAccess.Run "ASP_SkillSearc h", strTable, oUpload.Form("f irstname"), oUpload.Form("s urname")
I have a few issues that i need to solve, any help would be greatly appreciated:
1/ This code takes around 2+mins to run, so I would like the code to run
and for the webpage to be released immediately, so that they do not have to
wait for the code.
2/ I would like to do a similar thing that i do in VB6 (i am new to ASP) which i would use this code for: on error resume next Set objAccess = Server.GetObjec t("Access.Appli cation") If err = True then Set objAccess = Server.CreateOb ject("Access.Ap plication") End if Is it possible to check if a version of access is running, like above?
3/ I would like to check if the function within access that i am
attempting to execute is running already.
Sorry about the list of problems,
As i said before any help would be greatly appreciated.
Thanks Si
Si wrote: Hi Guys
I am using this code to execute an Access VBA function from ASP:
strDbName = strDataSource & "data\webjobs.m db" Set objAccess = Server.CreateOb ject("Access.Ap plication") objAccess.Visib le = False objAccess.OpenC urrentDatabase strDbName objAccess.Run "ASP_SkillSearc h", strTable, oUpload.Form("f irstname"), oUpload.Form("s urname")
What is oUpload? I have a few issues that i need to solve, any help would be greatly appreciated:
1/ This code takes around 2+mins to run, so I would like the code to run and for the webpage to be released immediately, so that they do not have to wait for the code.
Access does not support asynchronous execution, so it cannot be done this
way. You should find another way to run this code. For one thing: it is not
a good idea to automate Access (or any Office app) from ASP code. There will
be no one sitting at the server to respond to errors.
Is it possible to convert the VBA code to a vbscript function that can be
run in an ASP page? If so, you can use the XMLHTTPRequest object from
client-side code to asynchronously call the page. For details, please post
to a client-side code newsgroup devoted to whichever language you are using
in your client-side code. Look for newsgroups with "dhtml" in their name.
m.p.scripting.* will also do.
If you need to do this in server-side code, you can use the ServerXMLHTTP
object, like this:
<%
url = "RunSkillSearch .ASP"
set xmlhttp = server.CreateOb ject("MSXML2.Se rverXMLHTTP")
xmlhttp.open "GET", url, true
xmlhttp.send ""
set xmlhttp = nothing
%>
If you need to pass parameters do this instead:
url = "RunSkillSearch .ASP?firstname= " & _
oUpload.Form("f irstname") & "&surname=" & _
oUpload.Form("s urname") 2/ I would like to do a similar thing that i do in VB6 (i am new to ASP) which i would use this code for: on error resume next Set objAccess = Server.GetObjec t("Access.Appli cation") If err = True then Set objAccess = Server.CreateOb ject("Access.Ap plication") End if Is it possible to check if a version of access is running, like above?
Yes. On Error Resume Next works in vbscript.
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Hi Bob
oUpload, is a part of ASPUpload, which is what my predecessor used to upload
a Word doc to our webserver.
I dont think i explained qu1 too well: I wish to execute the function in
access and then release the ASP page from access. Then the server can busy
itself running the code, which only modifies data in the background and the
user can continue looking through the website.
I dont fancy turning the code into VBScript as it will take much longer to
run.
Thanks Si
"Bob Barrows" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. . Si wrote: Hi Guys
I am using this code to execute an Access VBA function from ASP:
strDbName = strDataSource & "data\webjobs.m db" Set objAccess = Server.CreateOb ject("Access.Ap plication") objAccess.Visib le = False objAccess.OpenC urrentDatabase strDbName objAccess.Run "ASP_SkillSearc h", strTable, oUpload.Form("f irstname"), oUpload.Form("s urname") What is oUpload?
I have a few issues that i need to solve, any help would be greatly appreciated:
1/ This code takes around 2+mins to run, so I would like the code to run and for the webpage to be released immediately, so that they do not have to wait for the code.
Access does not support asynchronous execution, so it cannot be done this way. You should find another way to run this code. For one thing: it is
not a good idea to automate Access (or any Office app) from ASP code. There
will be no one sitting at the server to respond to errors.
Is it possible to convert the VBA code to a vbscript function that can be run in an ASP page? If so, you can use the XMLHTTPRequest object from client-side code to asynchronously call the page. For details, please post to a client-side code newsgroup devoted to whichever language you are
using in your client-side code. Look for newsgroups with "dhtml" in their name. m.p.scripting.* will also do.
If you need to do this in server-side code, you can use the ServerXMLHTTP object, like this:
<% url = "RunSkillSearch .ASP" set xmlhttp = server.CreateOb ject("MSXML2.Se rverXMLHTTP") xmlhttp.open "GET", url, true xmlhttp.send "" set xmlhttp = nothing %>
If you need to pass parameters do this instead: url = "RunSkillSearch .ASP?firstname= " & _ oUpload.Form("f irstname") & "&surname=" & _ oUpload.Form("s urname")
2/ I would like to do a similar thing that i do in VB6 (i am new to ASP) which i would use this code for: on error resume next Set objAccess = Server.GetObjec t("Access.Appli cation") If err = True then Set objAccess = Server.CreateOb ject("Access.Ap plication") End if Is it possible to check if a version of access is running, like above?
Yes. On Error Resume Next works in vbscript.
HTH, Bob Barrows
-- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
Si wrote: Hi Bob
oUpload, is a part of ASPUpload, which is what my predecessor used to upload a Word doc to our webserver.
I dont think i explained qu1 too well: I wish to execute the function in access and then release the ASP page from access.
I understood. The same answer applies: Access does not support asynchronous
operations. Anything you do with Access requires you to wait for completion.
Then the server can busy itself running the code, which only modifies data in the background and the user can continue looking through the website.
I dont fancy turning the code into VBScript as it will take much longer to run.
Not necessarily. Why would you think that?
The advantage is that you can use the XMLHTTP object to run the code
asynchronously, allowing the user to "continue looking through the website."
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mrbog |
last post by:
Tell me if my assertion is wrong here:
The only way to prevent session hijacking is to NEVER store
authentication information (such as name/password) in the session.
Well, to never authenticate a user from information you got from the
session. Each secure app on a site must challenge the user for name
and password, each and every time the user accesses it (not just once
and then store it in the session). If a secure app is multi-page,...
|
by: Wolfgang Kaml |
last post by:
Hello All,
I have been working on this for almost a week now and I haven't anything up
my sleeves anymore that I could test in addition or change....
Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue,
I am posting this on all of the three newsgroups.
That's the setup:
Windows 2003 Server with IIS and ASP.NET actiavted
Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
|
by: Dr. StrangeDub |
last post by:
I am part of a group that has developed an ASP.Net web application. I
am looking for a way to determine whether or not the browser is
actually running on the web server. For this case (when executing IE
on the webserver) I want to remove a link to Remote Desktop -- as the
desktop is NOT remote in this case, and I believe doesn't work
attempting remote access to one's self. I wrote the following code to
check the "browser on server"...
|
by: Ben |
last post by:
My current project requires me to create part of a form that is
created on the fly. The project consists a list of entries to an
event. The name and address and such is easy. The design is detup so
that the creater of the even can make their own event in the database.
When they do so a 2 tables are created. One for the entries such as
names and the other is for the parameters of each event.
The creator then goes in and makes each event...
|
by: Neil |
last post by:
I have a check box on a form that's bound to a function that returns a
True/False value. When the user clicks on the check box, I run some code
through the MouseDown event. Everything works fine.
Only problem is: when the user clicks on it, there's a beep, and then they
get a status bar message: "Control can't be
edited; it's bound to the expression...." That's very annoying and
disconcerting.
Is there a way to trap the click and...
| |
by: Francesc Guim Bernat |
last post by:
Dear colleagues,
i'm getting in troubles using one XML library with Visual Studio .NET
and Xerces with Xalan.
When i execute the code i get the next run time error:
"Run-Time Check Failure #2 - Stack around the variable 'resolver' was
corrupted."
Looking on internet i've seen that the compiler, if you're running your
|
by: maccaroo |
last post by:
Hello,
Is it possible to find out if the current code if executing in the full
version of Access or if it is using a runtime? We have a number of
roaming users running a mixture of versions, but using the same
program. I need to implement features such as spell-checks, but don't
want to confuse the runtime users with options they cannot use. Is
there some sort of check that can determine this?
Thanks
|
by: tshad |
last post by:
What would be a good way to check programmatically whether a service was
running?
We have a service that dies periodically and I need to check to see if this
service is running. I know how to check to see if the status is in stopped
or running mode. But that doesn't tell me if it is actually running.
I need to know this so that if it happens I can programmatically start the
same service on another machine.
|
by: Lester |
last post by:
I'm driving myself crazy with a problem in trying to translate a query
written for Access to that for SQL server. I would think that I would
use a trigger, but am not sure how to set it up.
We have a database that manages bookings in four banquet halls. It was
running in an Access database, but two years ago, I migrated it to SQL
server.
In the access database I used VBA to check to ensure no duplicate
bookings. I wanted no dup...
|
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |