• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jTDS - USE database statement failed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic