Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT DBF
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 Procedures...is 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
Runtime.getRuntime().exec(...)
Re:Re:Re:Re:VFP routines...workaround
Paul Hall
2006-12-04 07:19:56.0
Thanks.
I don't find Runtime.getRuntime().exec(...) in the
documentation.

How can I run this function from ColdFusion?

thanks
Paul Hall
phall@masterymg.com
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
Thanks.
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
phall@masterymg.com
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:

try{
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.
if(exitVal!=0){
log("Javac Process exitValue: " + exitVal);
System.err.println("Javac Process exitValue: " + exitVal);
}else
log(version.getVersionName()+" compilation has completed:-)");
}catch(Exception e){
log(e);
System.err.println(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
phall@masterymg.com
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




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap