• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

exception while connecting sqlserver 2000 with java application

 
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody

Please anybody solve my this problem.I am connection my standalone application through sqlserver2000.Code is compile fine but at run time i got error .I create the table 'accounts' in master database .I run query successfuly and got the result fine in sql analyzer but error when i try to get the data through application.
error is:

exception generated java.sql.SQLException:[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'accounts'
 
Ranch Hand
Posts: 341
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, this looks if you have some problem with SQL driver or the user you are using to get the data doesn't have enough credentials. Check the permisssions for the user you are using in the code and, if he has atleast read access.
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using the same username to log in the analyzer and in your JDBC connection?
Can you try to put the schema name in front of the table name (master.accounts)?

Regards, Jan
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you creating anything in the master database?
 
Ranch Hand
Posts: 225
Spring Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you paste your jdbc java code for the same for understanding the problem more clearly ?



Regards
Baseet Ahmed

Request to ALL:
"Do worship The Creator,not the creation."
 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic