Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.193
  HXTT Cobol 5.0.193
  HXTT DBF 7.1.194
  Buy Now
  HXTT Excel 6.1.197
  HXTT Json 1.0.165
  HXTT Paradox 7.1.193
  HXTT PDF 2.0.193
  HXTT Text(CSV) 7.1.193
  HXTT Word 1.1.193
  HXTT XML 4.0.194
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

VFP routines...workaround
Paul Hall
2006-12-03 10:03:32.0
Thanks for your answers!
Yes, putting the quotes around the file with path worked!
(select * from "lookupf/lookup")...thanks.

Much of our work involves stored routines...with parameters.
Since DBF v3.0 does not support stored procedures,
is there any other way we can run those routines?
Perhaps a pass-through command...Can we pass
VFP commands through ColdFusion?...for example:
" Do TestMessage.prg ", or
" Do TestMessage.exe ", or
" Run TestMessage.exe "....
is there any other work around you can suggest?
I saw in a note somewhere that your Access driver
supports Stored that correct? If so,
can that driver fire off an EXE that we build with VFP?
Re:VFP routines...workaround
HXTT Support
2006-12-03 16:01:45.0
>I saw in a note somewhere that your Access driver
>supports Stored Procedures...
Yeah. Because MS Access's stored procedures can be translated into SQL. But VFP is a complicate languag at all.

>is there any other work around you can suggest?
Yeah. You can use System.exec function to call some bat files, which will set enviroment and call your VFP program.
Re:Re:VFP routines...workaround
Paul Hall
2006-12-04 05:58:46.0
Thanks for your response.
Sorry, I can't seem to find documentation on "System.exec" function.

How would I run this command through ColdFusion to execute
a bat file?
Re:Re:Re:VFP routines...workaround
HXTT Support
2006-12-04 06:16:34.0
Sorry. It's in Runtime class, not in System class.You should use
Re:Re:Re:Re:VFP routines...workaround
Paul Hall
2006-12-04 07:19:56.0
I don't find Runtime.getRuntime().exec(...) in the

How can I run this function from ColdFusion?

Paul Hall
Re:Re:Re:Re:Re:VFP routines...workaround
HXTT Support
2006-12-04 07:22:57.0
It's at Java API document for java.lang.Runtime class.
Re:Re:Re:Re:Re:Re:VFP routines...workaround
Paul Hall
2006-12-04 07:59:16.0
Sorry, I was looking in the DBF v3.0 documentation. I now see you
meant java documentation.

I am now searching on google etc. for coder sites that
referencing implementing this java function within ColdFusion.

Thanks, you've given me helpful direction! I will let you know
my results, so you can pass on to others.

Do you know any other licensees of DBF v3.0 using ColdFusion?

Thanks again,
Paul Hall
Re:Re:Re:Re:Re:Re:Re:VFP routines...workaround
HXTT Support
2006-12-04 17:24:02.0
Many user is using ColdFusion, and one Adobe employee is using HXTT DBF, HXTT Access, and HXTT Excel with ColdFusion.

If you wish to use VFP at the same time, please use jdbc:dbf:/yourdbpath?lockType=VFP to let HXTT DBF and VFP can see each other. BTW, please check whether you hava many stored procedures, and if there's few stored procedures, and maybe the better way is to use sql to replace it since HXTT DBF supports transaction.

I copy a sample code, which is using all version of javac to compile our products:

Process proc= Runtime.getRuntime().exec(commandBuff.toString());//Gets a Process object for managing the javac subprocess
InputStream stderr = proc.getErrorStream();//Gets the error stream of the javac subprocess.
BufferedReader br = new BufferedReader(new InputStreamReader(stderr));
String line = null;
while ( (line = br.readLine()) != null){
log(line);//Logs the output of the javac subprocess
int exitVal = proc.waitFor();//Waits for the javac subprocess to complete, and returns the exit value for the javac subprocess. Normally, an exit value of 0 indicates success; any nonzero value indicates an error.
log("Javac Process exitValue: " + exitVal);
System.err.println("Javac Process exitValue: " + exitVal);
log(version.getVersionName()+" compilation has completed:-)");
}catch(Exception e){
Re:Re:Re:Re:Re:Re:Re:Re:VFP routines...workaround
Paul Hall
2006-12-09 04:24:05.0
Thank You for all your help.

I am new to ColdFusion and do not know how to code Java.
However, I discovered that ColdFusion has a command that
uses Runtime.getRuntime().exec called . I think
I can use this to run a VFP exe. (I will have to be careful to
set up the user environment the right way.)

I would prefer to run the PRG in VFP so that it is running in
the same process space as my queries...but, the EXE approach
will get me by.

Thanks again for pointing me in the right direction!

Paul Hall
Re:Re:Re:Re:Re:Re:Re:Re:VFP routines...workaround
HXTT Support
2006-12-09 06:03:36.0
Anyway, I don't think that it's a good idea to call VFP program in Java. If your VFP program is simple, please consider to use Java and SQL to replace it.

Search Key   Search by Last 50 Questions


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap