How can i call forpro prg file from java
Hai friends,
I have a doubt,clear it.
how can i call forpro prg file from java file
by,
N.Vijay
Thanks to your reply,
I have some print statements in my foxpro program file.
Then i like to invoke that foxpro file from my java file
This want i want..,
by,
N.Vijay
Similar Messages
-
How can i call a DLL file from labview?
Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
Please Mark the solution as accepted if your problem is solved and donate kudoesAs far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
Have a look at this
/sletten -
How can I call a hsqldb procedure from Java
Hello,
I am trying to call from Java a stored procedure but I keep having exceptions!!!
In addition, I have no idea how I can get the result of the procedure !!!!
I have spent the whole day in Internet.... no luck!!
===============================================
I[b] java.lang.Exception: +updatejava.sql.SQLException: Unexpected token: # in statement [ call MODIFY_FIELD_SEPARATOR(#) ]
at util.UtilBean.test_upd(UtilBean.java:369)
===============================================
The following procedures have been created and tested withing the database and there work.
- public static String manage_field_separator(String ifs)
-public static String manage_refresh_interval(int val)
The alias have been created:
CREATE ALIAS MODIFY_FIELD_SEPARATOR FOR "com.lucent.util.StoredProcedures.manage_field_separator";
CREATE ALIAS MODIFY_REFRESH_INTERVAL FOR "com.lucent.util.StoredProcedures.manage_frefresh_interval
My file.java contains the flollowing:
public String test_upd(String tableName, String paramValue)
throws Exception
String res="0";
Connection conn=null;
CallableStatement cs= null;
try
conn=DBConnection.DBConnect();
String p="MODIFY_"+tableName.toUpperCase()+"("+paramValue+")";
cs=conn.prepareCall( "{call "+p+"}");
cs.execute();
// Suppose to get the result res of the function!!!!
catch (SQLException e)
exceptionMessage="+update"+e.toString();
System.out.println("exceptionMessage="+exceptionMessage);
throw new Exception(exceptionMessage);
finally
Statement stmt=null;
DBConnection.closeConnection(conn,stmt);
return res;
}Obviously I am doing something wrong ..... but I don't know what!!!
Could you help me please?
THanks a lot!Thanks for your quick response.
I need to construct the name of the procedure on the fly because I don't know the name of the table I need to modify until excecution time.
I have modified the code the following way but it still does not work!!!
I still get the exception:
java.lang.Exception: +updatejava.sql.SQLException: Unexpected token CALL, requires SELECT in statement [(call MODIFY_FIELD_SEPARATOR(?)}]
at util.UtilBean.test_upd(UtilBean.java:380)
public String test_upd(String tableName, String paramValue)
throws Exception
String res="0";
Connection conn=null;
CallableStatement cs= null;
try
conn=DBConnection.DBConnect();
cs=conn.prepareCall( "(call MODIFY_"+tableName.toUpperCase()+"(?)}");
cs.setString( 1, paramValue);
cs.execute();
// Suppose to get the result res of the function!!!!
catch (SQLException e)
exceptionMessage="+update"+e.toString();
System.out.println("exceptionMessage="+exceptionMessage);
throw new Exception(exceptionMessage);
finally
Statement stmt=null;
DBConnection.closeConnection(conn,stmt);
return res;
} -
How can i call a CGI script from java?
The subject pretty much says it all. I want to call a perl cgi script so i can read from/write to files on a server. I don't know how to sign applets and this would be the easiest way for me, if someone could please tell me.
Let me get this clear. Basically what u want to do is to just call a URL, right?
U can do it by using the following code:
import java.applet.*;
import java.net.*;
import java.io.*;
public class testhttp
public static void main(String[] args)
try
URL url = new URL ("http://../testcgi.cfm");
HttpURLConnection cxn =
(HttpURLConnection)url.openConnection();
cxn.setRequestMethod("POST");
cxn.setUseCaches(false);
cxn.setDoOutput(true);
cxn.setDoInput(true);
ByteArrayOutputStream bytes = new
ByteArrayOutputStream(400);
PrintWriter writer = new PrintWriter (bytes,true);
writer.print("application=map&release=1&items=prog1");
writer.flush();
cxn.setRequestProperty("Content-
Length",String.valueOf(bytes.size()));
cxn.setRequestProperty("Content-
Type","application/x-www-form-urlencoded");
bytes.writeTo(cxn.getOutputStream());
System.out.println(bytes);
String currentLine;
BufferedReader in = new BufferedReader (new
InputStreamReader(cxn.getInputStream(),"8859_1"));
while((currentLine = in.readLine()) != null) {
System.out.println(currentLine); }
catch(Exception e) { e.printStackTrace(); }
There is also a library called HTTP client which can be found at:
http://www.innovation.ch/java/HTTPClient/index.html
It's very simple to use and the documentation is all there, but their web server seems to be down right now.
Anyway, hope my post helps. -
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
How can we call a class file of one package for class file of another
How can we call a class file of one package from class file of another package and both packages exist in a same folder
How can we call a class file of one package from
class file of another package and both packages exist
in a same folder
Luckily they don't so it's really not a problem after all. -
How can i create a pdf file from Indesing, whit out loosing resolution...
How can i create a pdf file from Indesing, whit out loosing resolution...
in linked images (bitmap) idon´t know where or how can i keep the same resolution "image" that is from the original file ......In the export settings there is a panel called Compression. You can set downsampling and compression, or lack thereof, there.
-
How can I convert on HDF file from HWS file?
how can I convert on HDF file from HWS file?
Well by opening up the HWS file with HDFView, it contains the below structure. In the axis0 properties (time axis) there is a field called increment that is the sampling rate I used (5 nanoseconds). But I do NOT see any additional info in terms of triggering modes or delays, etc.
wfm_group0
axes
axis0
axis1
data_vector
data (here is our data, I verified it is correct)
id
traces
trace0 (we don't care about this, I think)
vectors
vector0
data (not sure what the difference is between this and axis1
wfm_group0 (1576, 2)
Group size = 4
Number of attributes = 5
major_version = 2
minor_version = 0
release_version = 6
type = NI-Waveform
writer = NI-HWS
axis0 (7424, 2)
Group size = 0
Number of attributes = 5
implicit? = 1
increment = 5.0E-9
numDigits = 57
ref_time = 0
start = 0.0 -
How can I move an icon/file from one screen of my ipad to another?
How can I move an icon/file from one screen on my ipad to another?
Press and hold the icon until they start to wiggle. Then while holding it, drag it to the edge of the screen and wait for the page to switch, then let go of the app
-
How can I checkout an existing file from CVS without going through the wiz
How can I checkout an existing file from CVS, that is not already in my local jdev, without going through the wizard and checkingout everything?
You can't. AI doesn't produce .PLT files.
-
How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?
How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?
In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app. Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.
-
How can I prevent a PDF file from being copied, printed or downloaded? Students should only be able to view the text and and not distribute it in any way.
You can prevent it from being printed by applying a security policy to it
in Acrobat. The rest can't be prevented, unless you spend a LOT of money
on DRM protection. -
Hi all,
I am developing an application. in this app i have to implement RMI.
My problem is this, How can a client open a files from the server.
all the html, pdf files are stored in the server's directory like C:\audit\filename.
There is a folder on the server's C directory which contains all the html , pdf files.
please tell me how can a client open a file from the server using RMI.
Please send me the solution as soon as possible.
Thanks & Regards
BhavishyaThat's doing it the hard way. Why not use HTTP or FTP?
-
I have converted a pdf to word. How can I access the Word file from my online account?
I have converted a pdf to word. How can I access the Word file from my online account? When it says 'download the converted file' I choose a location on my PC and click, but nothing happens. It seems that it can only save the converted file to my online account. I went to my online account but I see no way to look for the file
Hey Fabrizio,
You might need to sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials to convert your PDF file to Word.
Do you get the 'download' prompt?
Also, you can find the converted files by clicking at the 'Files' tab.
Please try the same using a different browser and check.
Hope to hear from you.
Regards,
Anubha -
How can I delete two .jpg files from my desktop that refuse to be deleted?
How can I delete two .jpg files from my desktop that refuse to be deleted?
The two icons refused to be moved to the garbage. The good part in all this is that ater I turned off the computer at night and turned it back on the next morning they were gone!
Thanks.
Maybe you are looking for
-
Rückspeichern auf DV Band mit JVC DVX 707 EG
Hallo, ich arbeite mit Adobe Premiere Elements 10, Asus Computer mit Windows 7 und einem Camcorder JVC DVX 707 EG, der Mini-DV Bänder benutzt. Ich überspiele die Filme auf den Computer, bearbeite sie und spiele sie dann wieder zurück auf DV-Band. Lei
-
why can't i edit a photo in the new version of lightroom in a legacy version of PS. i can only open it in CC2014. i saw no options in the preferences panel to fix choose what version i want to edit in.
-
Mac OS 10.4.10 / Unable to mount my external drive
I'm using a previous model 15" MacBook Pro, equipped with the 2.33 Core Duo chip and 2 GB of RAM. I used software update on Saturday to upgrade to 10.4.10 and since then, I haven't been able to get my external USB hard drive to mount. I've done some
-
How to remove the tags in a html file?
I am trying to remove all the tags in a html file , just text left. I have written a class myself,but it just works for html tags. So could u please give me some tips ? thks!
-
Bluetooth File Exchange - V551 - 10.4.10
I am able to use iSync to sync the addresses, etc. with my mac and Motorola V551 cell phone (which bluetooth sees as a computer – not a cell phone). I know the computer sees the V551 because of the success in syncing addresses into this particular Ma