aspose file tools*
The moose likes JDBC and the fly likes help needed for MS SQL Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "help needed for MS SQL Server" Watch "help needed for MS SQL Server" New topic

help needed for MS SQL Server

Yuan Ye
Ranch Hand

Joined: Mar 05, 2003
Posts: 172
I have used the type4 driver from MS to connect with MS SQL Server. The connection is fine. And I create a new database db1 with table tb1 in SQL server. However after connection, when I try to use a java program to run a SQL like "select * from tb1". It give me the error of
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]SELECT permission denied on object 'tb1', database 'db1', owner 'dbo'.
If I use the same code to access a database coming with SQL server like "pub". Everything is fine. And I have changed given all access permissions of tb1 and db1 to the user I used to connect. Does anyone know how to solve this problem? Thanks
It is sorta covered in the JavaRanch Style Guide.
subject: help needed for MS SQL Server