jtds

Migrating from jTDS JDBC driver to Microsoft JDBC

拈花ヽ惹草 提交于 2019-12-19 09:45:30
问题 Microsoft has recently released a new JDBC driver (version 6.0.7507.100) with some very interesting features. I am mostly interested in the TVP feature. This is why I would like to replace the current jTDS driver with the Microsoft driver. The problem arises when trying to log in to our production server. Lets say we use the domain user "mydomain\dbuser" to login to the sql server instance. This is the jtds jdbc url we have used so far: jdbc:jtds:sqlserver:/sqlServer:1433/myDb;domain=mydomain

java.sql.SQLException: Single-Sign-On is only supported on Windows. Please specify a user name

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 06:59:35
问题 I am using the jTDS driver in order to connect to an SQL Server database from my Android application, which uses the Windows Authentication. As advised in the FAQs, I read the READMESSO file and as told, I placed the native SPPI library (ntlmauth.dll) in the system path (defined by the PATH system variable) However, when I try to connect to the database using the following code: String driver = "net.sourceforge.jtds.jdbc.Driver"; Class.forName(driver).newInstance(); String connString = "jdbc

Connecting to Azure SQL DB via JTDS on an Android device

╄→尐↘猪︶ㄣ 提交于 2019-12-12 18:19:44
问题 I'm using JTDS 1.2.7 to connect my Android app to a Windows Azure SQL Server. Source code: String connectionString = "jdbc:jtds:sqlserver://SERVER.database.windows.net:1433;database=demo;" + "user=test@SERVER;password=PASSWORD;ssl=require"; Class.forName("net.sourceforge.jtds.jdbc.Driver"); Connection con = DriverManager.getConnection(connectionString); Statement st = con.createStatement(); res=st.executeQuery(sql); When I try to connect to the database I get the java.lang.NoClassDefError:

SQL Server JBDC Driver comparison

▼魔方 西西 提交于 2019-12-12 10:43:47
问题 Currently we use jtds for connecting to our SQL Server databases. I've always taken it for granted that we use it due to performance and reliability reasons, however, it's usage pre-dates my employment. All of that being said, we are now playing with the idea of moving to SQL Server 2008, which jtds has limited support for. Initial tests seem to indicate that jtds has better performance than the Microsoft supplied driver on 2005. So my question is does anyone have any empirical evidence or

Connecting android app to sql server using jtds

荒凉一梦 提交于 2019-12-11 08:40:12
问题 I'm tired of searching with no result i don't know where the problem come from , i'm trying to connect my android app with the local SQl server 2008, now i get unable to get information from sql server. please help this is my code : String url = "jdbc:jtds:sqlserver://10.0.2.2:1433/lear_db;instance=SQLEXPRESS;"; TextView coucou = new TextView(this); try { Class.forName("net.sourceforge.jtds.jdbc.Driver"); java.sql.Connection connexion = DriverManager.getConnection(url,"kamal","kamal1234");

Is there a bug with “set chained” in setAutoCommit() in net.sourceforge.jtds.jdbc.Driver?

耗尽温柔 提交于 2019-12-11 08:24:27
问题 I am having some confusion with set chained statement in setAutoCommit() method in net.sourceforge.jtds.jdbc.Driver The source code says: 2161 if (serverType == Driver.SYBASE) { 2162 if (autoCommit) { 2163 sql.append("SET CHAINED OFF"); 2164 } else { 2165 sql.append("SET CHAINED ON"); 2166 } However, shouldn't it be backwards, and chaining should be OFF for autoCommit==false? The reason I ran into this is as follows: I am writing a Java app which needs to do some complicated SQL and roll back

Exception while using jtds for SqlServer connectivity

浪子不回头ぞ 提交于 2019-12-11 06:52:38
问题 I am using jtds driver to connect to SQLServer from a UnixBox using windows authentication from a SpringBoot+JPA application. Its a standalone application and not a WebBased application. I am successfully able to connect to the same but when I try to save some data using JPARepository, I receive the following exception : java.lang.AbstractMethodError: null at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setCharacterStream(JtdsPreparedStatement.java:1274) ~[jtds-1.3.1.jar:1.3.1] I checked

Failed to remote server SQL SERVER using jdts

和自甴很熟 提交于 2019-12-11 05:04:21
问题 I have read some articles about jdts.jar library then I wanna implement it to android app, already did some coding, but I always failed to connect with database sql server. First time I tried to remote using Navicat SQL browser, and I could connect it, but when I did android coding, I couldnt connect it. Already checked ip public, username, password, and database name, they are same with my android coding. Here my log cat : 07-20 16:32:49.270 31447-31447/? E/AndroidRuntime? FATAL EXCEPTION:

JDBC How to get all generated keys from single insert with many values query?

房东的猫 提交于 2019-12-11 03:06:24
问题 I'm inserting multiple rows using a PreparedStatement with a single query: String query = "insert into MyTable (a,b,c) values (?,?,?),(?,?,?),(?,?,?),(?,?,?)"; // insert 4 rows in a single query PreparedStatement stmt = connection.prepareStatement(query, Statement.RETURN_GENERATED_KEYS); // .. here: loop to set all 4 x 3 values in my prepared statement And I want to get the IDs generated by the MSSQL DB. I'm not sure which flavor of execute to use. The execute() method doesn't return the

SQL Server log in failing from Java DriverManager.getConnection(), working from Python with pymssql.connect()

馋奶兔 提交于 2019-12-11 01:22:27
问题 I'm trying to use DriverManager.getConnection() to connect to a SQL Server db from a Java application, but I keep getting "Login failed for user" errors with it. I've tried using both com.microsoft.sqlserver.jdbc.SQLServerDriver and net.sourceforge.jtds.jdbc.Driver to connect, but both keep hitting the issue. Here's the code I'm using to connect: Class.forName("net.sourceforge.jtds.jdbc.Driver"); conn=DriverManager.getConnection("jdbc:jtds:sqlserver://SERVERADDRESS:1433;DatabaseName=DBNAME