How to call a FoxPro .prg file through SQL statement

I created a program exclusive.prg which basically consisted of the statement USE my table exclusive. How can i call this function through a SQL statement using java

Hi,
Thank you for he reply.
Runtime.getRuntime().exec(..)works fine with .exe files.
but, when a foxpro program file(.prg) is compiled, a (.fxp) file is produced and not a .exe file
when i write some thing like
statement.execute("exclusive.fxp")i'm getting an error. here is the stack trace
java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violation
     at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
     at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
     at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
     at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
     at excel.TestMom.main(TestMom.java:28)i also tried using
statement.execute("do exclusive.fxp") and
statement.execute("do exclusive.prg")I got the same error.
Dont know what else to do.Can you please suggest some way to work around.

Similar Messages

  • How can I upload a (image) file through an applet ?

    How can I upload a (image) file through an applet ?

    have a look at http://www.haller-systemservice.net/jupload/
    i'm using Apache Jakarta HTTPClient to create a new HTTP connection to the webserver and sending a new POST request, which holds the image file. (So it's RFC1867 conform)
    there is also an open source implementation of such an applet on sourceforge. it's also called JUpload, but i think it's not maintained any more.

  • How to append records in a file, through file adapter.

    Hi All,
    How to append records in a file, through file adapter.
    I have to read data from database and need to append all records in a file.
    Thanks in Advance.

    Hi,
    I think you have a while loop to hit the DB in your Process (As you said you have to fetch data from DB 10 times if 1000 rec are there)
    First sopy your DB O/P to one var
    and from second time append to previous data.(Otherwise you can directly use append from starting instead of copy and append)
    When loop completes you can transform to File adapter Var.
    Otherwise you can configure yourFileadapter such that it will aapend current records to previous records.
    You can use 'Append= true' in your file adapter wsdl.
    It will append previous records to current records in the same file.
    Regards
    PavanKumar.M

  • How to call function in jar file?

    First, I can't write english well.(I'm korean.. ) sorry about that.
    I have known function in jar file.
    but I don't know how to call function in jar file.
    how can I this work?
    My project and another project are respectively developing D-project with me and other man.
    so i need it. or I can't do this work.
    I will paste other's source code in my source code.
    and then recomplie , build it.. but it is not my wish!
    thanks for reading my sentence.

    If you have a jar file with a class that you wish to use, then you must add the jar file to your class path ($CLASSPATH on unix, linux, etc. and %CLASSPATH% on Windows).
    Then you can use the class normally, just as you would if it were not in the jar.
    If you meant something else, you'll need to explain what you meant.

  • How to send business card (VCF file) through sms? it can only be send via email?

    how to send business card (VCF file) through sms? it can only be send via email?

    Go into your contacts click on the person you want to send, when the info opens scroll down to the bottom and click share contact it will as it you want to email or mms. 

  • How to call up an executable file (eg. MSPaint) from within my java program

    How to call up an executable file (eg. MSPaint) from within my java program

    Ummm... why would you want to get MSPaint anyway? Even in the absense of real software, Java's own graphics tools are way more sophisticated - with a little time and effort, you could write a simple paint package that beat MSPaint hands down.

  • How do i run a Labview file through a windows phone?

    Hello there
    How do i run a Labview file through a windows phone or a tablet? is it possible
    is there any phone specifications required? or steps?
    Thanks alot  

    Blokk wrote:
    na1992 wrote:
    hahaha my baad
    i mean if i have done my labview file on laptop and i want it to connect my file to a microcontroler using usb or any serial connection, i want a way that my labview file will run if i store it on a phone. 
     i searhced about exe  format but i didnt find enough info
    Sorry, but you should define more precisely what is your goal:
    " i searhced about exe  format but i didnt find enough info"
    If you build an exe using Labview, that exe will not run on iOS, or Android, if this is what you ask...
    Nor Windows Phone or Windows RT. A LabVIEW exe is compiled and linked for x86 or AMD64 architecture with Win32 API architecture and will only run on Windows for x86 or x64 systems.
    Windows Phone and Windows RT are despite the similarity in the name technically completely different platforms to the normal Desktop Windows system, just as different as MacOS X or iOS.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How it works (Calling Stored Procedure in DB2 Through Callable statement)

    Can anyone Please tell me what exactly happens on calling ESP(External Stored Procedure) through Callable statement Database point of view and Callable point of view also.
    eg:
    CallableStatement cstmt = con.prepareCall(
    "{call getTestData(?, ?)}");
    cstmt .executeUpdate();
    where getTestData is Stored Procedure in DB2.
    Can anyone please guide me working on this scenario..
    Message was edited by:
    Nitin_Gupta

    Check this post out:
    http://forum.java.sun.com/thread.jspa?threadID=638768&messageID=3785982
    But I think you should be getting results right? What do you mean you want it in a format other than resultset?

  • How to run Exe file through Sql server agent job

    Hello All
    i have 2 servers 
    1.Application Server
    2.Database server
    Application server has a .exe file so i wanted to run this exe file through SQL server agent job from database server.
    What is the process for run this Exe file 
    Can you plz suggest me step by step process
    Kamal

    While i'm trying to implement this below method
    Step1 : Right Click SQL Server Agent. Select New -> Job. This will open a wizard to schedule a new
    job.
    Step2 : Select Steps from options given on the left side of wizard. This is the main place to set your
    exe\program as a running step. Give some name to this step, Select Operating System (cmdexec) for the Type and give the full path of exe in Text box for Command.
    ex:\\10.11.00.98(your application serverIP)\ch.exe
    Thanks vanchan-Please
    mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    I got this below error
    Message
    Executed as user:NJROSJ345\SYSTEM. The process could not be created for step1 of job
    (Reason:Access is Denied)The step failed.
    But i have sys admin rights on the both the servers 
    Kamal

  • How to use a Sybase table in Oracle SQL statement?

    How to use a Sybase table in Oracle SQL statement?
    Sybase version : 11.9.2.4
    Oracle version : 10.2.05
    Thanks.

    user12088323 wrote:
    How to use a Sybase table in Oracle SQL statement?
    Sybase version : 11.9.2.4
    Oracle version : 10.2.05
    Thanks.Any Oracle client connected to the Oracle database can access Sybase data through the <font style="background-color: #FFFFCC">Database Gateway for Sybase</font> (it requires an additional license) or the <font style="background-color: #FFFFCC">Database gateway for ODBC</font> (it's free).
    The Oracle client and the Oracle database can reside on different machines. The gateway accepts connections only from the Oracle database.
    A connection to the gateway is established through a database link when it is first used in an Oracle session. In this context, a connection refers to the connection between the Oracle database and the gateway. The connection remains established until the Oracle session ends. Another session or user can access the same database link and get a distinct connection to the gateway and Sybase database.
    Database links are active for the duration of a gateway session. If you want to close a database link during a session, you can do so with the ALTER SESSION statement.
    To access the Sybase server, you must create a <font style="background-color: #FFFFCC">database link</font>. A public database link is the most common of database links.
    SQL> CREATE PUBLIC DATABASE LINK dblink CONNECT TO
    2  "user" IDENTIFIED BY "password" USING 'tns_name_entry';
    --dblink is the complete database link name.
    --tns_name_entry specifies the Oracle Net connect descriptor specified in the tnsnames.ora file that identifies the gatewayAfter the database link is created you can verify the connection to the Sybase database, as follows:
    SQL> SELECT * FROM DUAL@dblink;
    Configuring Oracle Database Gateway for Sybase
    <font style="background-color: #FFFFCC">{message:id=10649126}</font>

  • How to get the process id of a sql statement or a session  ....

    How to get the process id of a sql statement or a session . ..?
    Thanks

    What about this?
    SELECT pid
      FROM v$session s, v$process p
    WHERE p.addr = s.paddr
       AND s.sid = :sid;   -- replace :sid with your session idRegards.
    Al

  • HOW do I create a href to an sql statement?

    Answer to query:
    “You sould create a href to an sql statement ( create new user / passwd : and insert in a table (C_user,C_PASSWD), to have a list of users registred at your application)
    A htp page can manage this
    you should create roles that be granted to users,
    1- create &user dientified by &passwd;
    2- create role1....;
    3- grant &role1 to &user1;
    :user will be added by user if he chooses registration href.
    then he must add information in order to continue registration or push OK to confirm registration and let oracle grant previleges to the new user, a trigger can insert the new informations to the user_table_traces.”
    MY QUESTION:
    HOW do I create a href to an sql statement?
    Thank You

    Hello,
    I have an application written in PL/SQL that sits on top of an Oracle database. I want to know how add a password/login feature to the application. In other words the user can go to a certain URL to access and use the application. However when the user clicks on a certain link that is restricted, then the webpage displays fields so that the user has to enter a username and password. In order to access restricted features of the application such as ADD, UPDATE and DELETE.
    Thanks

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • How to call an ODI web service through PL/SQL

    Hi All,
    Can we call an ODI web service through PL/SQL. If we can, can you please provide me info/examples/links on how to accomplish this task ?
    Any information will help me and my team.
    Am I required to use UTL_HTTP ?
    Thanks,
    Amer
    Edited by: Rooney on Nov 6, 2012 9:58 AM

    Hi,
    Take a look at this :
    http://www.business-intelligence-quotient.com/?p=1466

  • How to get and display image file through servlet

    If I've got a jpg file on the server..
    How can I use servlet to return that image via the following calling method
    /displayfile?filename=image.jpg
    the image.jpg in the server will return
    I know that I need to set the content type to image/jpeg
    after that, how can I return the image file to browser?

    - Get the "file" Parameter from the URL QueryString
    - check if the File specified exists on your filesystem
    - read in the jpg from the file (best would be binary)
    - set the right Mime Type (as you already wrote)
    - write the filecontent to the ServletOutput as you would do with any other content
    - that's it.

Maybe you are looking for

  • Mail 4.5 (1084) is not automatically downloading larger attachments.

    Mail 4.5 (1084) is not automatically downloading larger attachments (i.e. a 2 MB file) without the user clicking on the SAVE button or the attachment icon (white square with down arrow). Before download: The problem is that if the user accidentally d

  • Time Capsule for iTunes storage?

    This is what I would like to do: Assign all of my movie/TV show files to the Time Capsule to free up my MBP hard drive space.  If I do that, can I still play the movies/TV shows on my Apple TV?  And, can all this be done via wireless too?

  • Hero Images Revert to Original Size After Being Resized

    Hi, I have read many forum questions about resizing hero images in slideshows, but I'm having a slightly different problem: In order to have larger images in my slideshow I have been resizing the hero images to 500px height one by one (as I can't see

  • Automator says "Workflow Completed" but it isn't ....?

    I have 1400 images to convert from JPGs to TIFs, with several manipulations in Photoshop CS2. The workflow has about 7 steps: All of them are "Do Action" and call a Photoshop action. When I run the actions manually in Photoshop, each of them works fi

  • Could not connect through thin driver

    I am trying to connect to database through thin driver but getting the following exception : Io exception:The Network Adapter could not establish the connection java.sql.SQLException: Io exception : The Network Adapter could not establish the connect