• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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: 5279
143
  • 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: 3915
45
  • 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.
 
And inside of my fortune cookie was this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!