On 28 oct, 06:40, Saji <jjk.s...@gmail.com> wrote:
> Hi
>    When I am running "JDBCSamples_mysql" I have notices only one table
> is created ie "COFFEES". This is because only ""CreateCoffees.java"
> is executed.
>            Can any one guide me, How  only ""CreateCoffees.java" is
> run when the project is run
Because the main java class declared in the project is
CreateCoffes.java.
To create the other tables (for example Suppliers table), you should
run the corresponding Java file (not the project) as explained in the
lab, in this case right click on CreateSuppliers.java and select run.
Next refresh the tables in the Services frame, Databases;
jdbc:mysql://...., jdbcdb by right clicking Tables and select Refresh.
You will then see the SUPPLIERS table.
Note that you eventually have to change all the java files to insert
your root password for mysql if any in the line:
try {
            con = DriverManager.getConnection(url,
                    "root", "yourpasswordforrootuserinmysqlhere");

Incidentally, you should remove the broken reference in the project,
since they are related to javaDB and have nothing to do in the mysl
project.

Michèle Garoche

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to