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 getCatalogs() method in DatabaseMetaData Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "getCatalogs() method in DatabaseMetaData" Watch "getCatalogs() method in DatabaseMetaData" New topic
Author

getCatalogs() method in DatabaseMetaData

Amrit Tiwana
Greenhorn

Joined: Jun 03, 2004
Posts: 24
Hi,

I'm using getCatalogs() method in DatabaseMetaData to get listing of all catalogs(database) in SQL Server 2000. I've created a DSN say 'demo'. When I create DSN, it shows me all the databases. But when I make call using getCatalogs() method in DatabaseMetaData, it doesn't return 'model' database. The others i get i.e. master, msdb, Northwind, pubs, tempdb.
Does anybody why???

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30405
    
150

Amrit,
What is the relationship between "model" and "demo"? I'm not sure if I'm following the question.

Off the top of my head, you may want to check that the new database has the appropriate permissions.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Amrit Tiwana
Greenhorn

Joined: Jun 03, 2004
Posts: 24
'demo' is the DSN name which I've created.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getCatalogs() method in DatabaseMetaData