How to make Java work with SQL Server?

前端 未结 9 1433
别那么骄傲
别那么骄傲 2020-12-13 06:23

I know this is a basic question, but I can\'t seem to find an answer and I apologize, if this question is way too stupid, but here we go:

I am supposed to work with

9条回答
  •  轮回少年
    2020-12-13 06:58

    I had the same problem with a client of my company, the problem was that the driver sqljdbc4.jar, tries a convertion of character between the database and the driver. Each time that it did a request to the database, now you can imagine 650 connections concurrently, this did my sistem very very slow, for avoid this situation i add at the String of connection the following parameter:

     SendStringParametersAsUnicode=false, then te connection must be something like url="jdbc:sqlserver://IP:PORT;DatabaseName=DBNAME;SendStringParametersAsUnicode=false"
    

    After that, the system is very very fast, as the users are very happy with the change, i hope my input be of same.

提交回复
热议问题