Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
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