Subject Re: versatility of the Inspector
From Alex Safian <noway@noway.com>
Date Mon, 16 Nov 2020 20:29:32 -0500
Newsgroups dbase.getting-started

Thanks Gaetano, I hope it turns out to be useful.

Gaetano Wrote:

>
> Thanks for the follow-up, great info again!
>
> On 15/11/2020 04:04, Alex Safian wrote:
> > Hi Gaetano:
> >
> > The idea is two-way interaction with web servers in a dBase desktop application. For example, the application I'm working on is a CRM app for a non-profit which processes credit card donations with PayPal.
> >
> > For a mailed in cc donation the data entry person finds the member record, enters the cc info, and clicks to submit a cc donation. Using web services info is sent to the PayPal (payflowpro for example) servers. If the transaction is approved that info is returned to the CRM which saves the donation record. If not approved the CRM abandons the donation record. Either way there is notice to the data entry person of what happened, and if it was failure what the problem was.
> >
> > IOW, the dekstop app works in this case like a web app that can interact with a server to, for example, buy something. This can be done because after MS created the web technology associated with AJAX (there's a good article about AJAX in the dBase knowledgebase), they also built similar capabilities into Windows. So if you google winhttp.winhttprequest.5.1 or just winhttp you will find a lot of info.
> >
> > There are many examples for winhttp on the web in c++, php, .net, etc. The closest to dBase are those for Visual Basic and the Windows scripting host. Those can be immediately translated to dBase. There are also a number of similar Windows technologies, such as the older xmlhttprequest, which is also used in AJAX.
> >
> > In the command window you can write
> > objHttp = new oleautoclient("winhttp.winhttprequest.5.1") and then Inspect(objHttp) and you will see the events, properties and methods associated with the object. Most of them seem to work fine -- some I'm not so sure of, but there are workarounds.
> >
> > I should also mention that the Windows scripting host is also available in dBase (Ken's book has a section on it), so it looks like that could be used instead of oleautoclient, though I haven't tried it yet.
> >
> > Alex
> >
> > Gaetano Wrote:
> >
> >> On 28/10/2020 12:43, Alex Safian wrote:
> >>> With this you can use web services in a desktop app.
> >>
> >> Thanks Alex, great info, I had not thought of Oleautomation but that is
> >> a great usage for the inspector if it shows the available events and
> >> methods available!
> >>
> >> Could you please elaborate on the above snippet? What kind of web
> >> services are you referring to?
> >>
> >> Cheers,
> >> Gaetano.
> >
>