my dog learned polymorphism*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
Similar Threads
[Security:090398]Invalid Subject: weblogic :java.lang.SecurityException: [nested exception is java.l
Oracle Transaction and Stored Procs
Need another set of eyes...
DataSources with JBoss
servlet reading properties file