This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

jTDS - USE database statement failed  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i have connection to sql

 String driver = "net.sourceforge.jtds.jdbc.Driver";
     Class.forName(driver);

but when try to connect i got error

   java.sql.SQLException: The USE database statement failed because the
   database collation Serbian_Latin_100_CI_AS is not recognized by older client
    drivers. Try upgrading the client operating system or applying a service
     update to the database client software, or use a different collation. See
    SQL Server Books Online for more information on changing collations.

I try this to add

   JVM with -Duser.language=en -Duser.region=US -Duser.country=US
but still get error.

Any idea?
 
Saloon Keeper
Posts: 5051
135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Try... applying a service  update to the database client software, or use a different collation. See SQL Server Books Online for more information on changing collations.


Which of these have you tried? Which collations does jTDS support (I'm assuming you're using the latest version; if not, upgrading it should be step 1) ?. Any particular reason you're not using Microsoft's driver?
 
ja ti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use jtds 1.3

I can't use microsft driver becaause i have dynamic port in sql server and get error tlc need to enabled and port 1433 is not ok
 
Rancher
Posts: 3767
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Microsoft driver let's you give it a port number.
You don't have to use the default.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!