File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
Bookmark "Creating Aliases in Java" Watch "Creating Aliases in Java" New topic
Author

Creating Aliases in Java

Pankaj K
Greenhorn

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: http://aspose.com/file-tools
 
subject: Creating Aliases in Java