1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Command Line tool for DB Transactions

Discussion in 'Java' started by divinelight0705, Aug 29, 2012.

  1. divinelight0705

    divinelight0705 New Member

    Joined:
    Aug 29, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    I want to build a command line utility tool in Java for DB Transactions on Linux. My requirement is when we run the java program it should show command prompt. From there User can enter any sql statement and get the restuls. Java Program should log all these transactions. Please let me know by using Java can we connect to DB and provide DB prompt for DB transactions? Replies are highly appreciated.

    Thanks in Advance:crazy:
     
  2. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    yes, there are 2 ways
    proper way been to use the necessary API of the db or the classes that come with java to run and access the DB [like mysql and oracle]

    other way it to directly run the necessary console (for ex if mysql is installed in the server you can run the commanline of mysql and run any command through it)
    this way is easier because you can directly output the output given by the commandline itself
     

Share This Page