[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q:MCL,FoxPro,and AppleScript: can they cooperate?
- To: firstname.lastname@example.org
- Subject: Re: Q:MCL,FoxPro,and AppleScript: can they cooperate?
- From: timh@uclink.Berkeley.EDU (Tim Heidinger)
- Date: Fri, 26 Aug 1994 06:48:13
- Keywords: FoxPro2.5, AppleScript, MCL
- Newsgroups: comp.databases.xbase.fox, comp.lang.lisp.mcl
- Organization: University of California at Berkeley
- References: <schmitt.777849542@tartarus>
- Xref: services.cambridge.apple.com comp.databases.xbase.fox:5682 comp.lang.lisp.mcl:5808
We are doing something similar where MacHTTP sends commands to Foxpro/Mac
and the results are returned to MacHTTP and eventually the web client.
Although Foxpro is severely limited in terms of applescript we use the "do
script" command to pass directives to Foxpro and get the desired result.
1. Create a foxpro program which will accept parameters passed from
applescript and return results to the clipboard.
2. Create an applescript which composes a foxpro command like: do
as_query with "id='12345' and state='MA'" and stores it to an applescript
3. Activate foxpro give the do script command_var where
command_var is the thing in step two.
4. Have applescript look in the clipboard for the results.
The foxpro program would look like this:
select name,id from dbf where &as_where into cursor temp
_cliptext='No records found'
_cliptext=_cliptext+' '+name+' '+id+chr(13)
If you need more detail examples contact me directly. Good luck.
>I'd like to write an application in MCL that makes use of data coming from
>a FoxPro database. I was planning on using Applescript to allow MCL to
>send an SQL query to FoxPro, have FoxPro run the query, and then send the
>results back to MCL. This is proving much more difficult than I anticipated.
>For one thing, although FoxPro 2.5 claims to be AppleScriptable, this is only
>in the very weakest sense of the term (as far as I can tell). It would be
>nice for AppleScript to be able to refer to FoxPro objects, but this is not
>possible. It looks as if I can have MCL write a file with an SQL query in
>it, and then FoxPro can run it and print the results to another file, which
>MCL can then read. Yuck! Is the way it has to be done?!?
>Has anyone tried anything like this? Should I be looking into other Mac
>database products? Any feedback appreciated!
Tim Heidinger 642-4740 email@example.com
Office of the Vice Chancellor for Undergraduate Affairs
Office of Undergraduate Admission and Relations with Schools