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 Creating Aliases in Java 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 "Creating Aliases in Java" Watch "Creating Aliases in Java" New topic

Creating Aliases in Java

Pankaj K

Joined: Aug 13, 2001
Posts: 1
I need to map existing table names of Oracle database with new table names.In other words, I need to create Aliases. For this purpose, I'm defining a properties object, called prop and then using the put method, I'm defining the aliases. Here is a part of code that I'm using:
java.util.Properties prop = new java.util.Properties();
prop.put("longname", "$TESTPB.DB.ABCDTBL");
After this, I'm passing this prop object to the getconnection method.
con = DriverManager.getConnection(DbURL, prop);
On compilation, this gives me an error on put method saying, TYPE EXPECTED.
Could you throw some light on, why this type expected error message is received and how I could achieve creating aliases.
Thanks in advance.

I agree. Here's the link:
subject: Creating Aliases in Java
jQuery in Action, 3rd edition