Solved

Passing Values / Triggering Event Between Web and Desktop Application

Posted on 2008-10-23
5
283 Views
Last Modified: 2013-11-27
I have developed a web based application in Classic ASP with a Visual Basic application to navigate through print send emails etc.  I have hit a brick wall and could do with some help passing values or triggering an event when a button on my webform is clicked to run some code on the VB App.

Hope that makes sense, so the two things i need advice on are:
1. how to trigger an event on my vb app from a webpage
2. how to pass variables from my web app to my vb app.

Many Thanks in Advance.
0
Comment
Question by:Ross-C
  • 4
5 Comments
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
Hi Ross

Easy part 1st, 2nd Q:
Please read both of my posts in this Q:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_21991495.html
the 1st post will give you a link to anothe post, where the data are sent from Access to the Web page, the code clicks a button, waits for results, then captures the values from the web page to Access.
Similar thing, but in another post, with embeded browser in Access:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23045378.html

2nd Q:
If you mean to send a command from your web page to a sub or a function in Access, then I am sorry, but I don't know how to do that,
I don't know if ODBC can help here.
But I can think of the following:
a. when clicking for a function from your web page, create a text file on your PC, with the command required.
b. make an intermediate Access mdb, where the timmer continuously looks for that file name which the web page can create, if it finds it, then it can open the main mdb and run the sub/function you want. In fact I think it can run it from a command line too.

jaffer
0
 
LVL 27

Accepted Solution

by:
jjafferr earned 250 total points
Comment Utility
ok, as for the 1st Q:
you can start Access from a shell command, which you can place in your web page, and include which Function you want to run, this Function can be run using the Access Macro.

The following example will run macro1 in c:\Frames_Colors.mdb:
"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "c:\Frames_Colors.mdb" /x macro1

so what you should do is, have different Functions/Macros for different purposes, then run the one you need.

jaffer
0
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
and here are the rest of the switches, just in case you need them:
http://www.vb123.com/workbench/help/commandline.htm
0
 
LVL 11

Author Closing Comment

by:Ross-C
Comment Utility
many thanks
0
 
LVL 27

Expert Comment

by:jjafferr
Comment Utility
Thanks for the points and the grade :)

To continue on this subject, now that I am into it :)

1. unfortunatly I couldn't find a way to directly run a Fuction in Access, so this will make us write more code, to test if Access was open, and if it was, then how to run that Function?

2. what if we want to pass a value to a Function, from the web page?
We cannot do this directly (that is to send the value along with the call to the Function, like: Call myFunction(myValue)
so what we can do is:
have that value ready on your web page,
run the Fuction,
have the Function to read this value from your web page (see my answer to your 2nd Q),
and if the Function is suppose to return a value to the web page, then send it to the web page (see my answer to your 2nd Q).

jaffer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now