help for create a database in java program 
Author Message
 help for create a database in java program

Hi, there,

I have trouble to run db2 command in my java program. eg, I try to  use the
following piece of code to create a db:
(I use window nt system)
             try {
                   Process prcs=Runtime.getRuntime().exec("db2cmd");
                    prcs=Runtime.getRuntime().exec("db2 CREATE DATABASE
LUNGREP ON D: ALIAS"
                     + "lungrep USING CODESET IBM-1252 TERRITORY US COLLATE
USING SYSTEM WITH \"the database for lungrep101\"");

                    prcs.waitFor();

 System.out.println("Successfully create the database");
             } catch (Exception e) { /* process exception */
               System.err.println("unable to run the process" +
e.getMessage());
              }

this program runs normally without any error message. However, it did not
create the specified db. Could any one give me a hint? thanks



Tue, 10 Aug 2004 01:17:42 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Please help me: Using Application Wizard to create a ODBC database program

2. need help in creating a database program...

3. Looking for Database program to create Database Applications

4. (Fwd) Looking for Database program to create Database Applicat

5. ---JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA-----JAVA---

6. New to java, need help with java database

7. CGI programming using JAVA (comparing JAVA & Perl)

8. help: calling external java program with parameters

9. Java Database Program

10. how to use SQL SErver database in a Java Program

11. i am writing my masters thesis on java database programming


 
Powered by phpBB® Forum Software