File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes help with a error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "help with a error" Watch "help with a error" New topic

help with a error

ben riches
Ranch Hand

Joined: Nov 08, 2002
Posts: 126
i have this code.
but when i put it into my visual compostion, it brings up an error what says: (The type Connection is ambiguous).
can someone tell what this means please.
String data = "jdbc dbc:myProject";
Connection conn = DriverManager.getConnection(data,"","");
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO Cust VALUES (?, ?)");
Braj Prasad

Joined: Apr 08, 2002
Posts: 16
You would have another package with the same class name as Connection being imported.
try referring it by the explicit package name:ie. java.sql.Connection = ....
I agree. Here's the link:
subject: help with a error
It's not a secret anymore!