mssql-jdbc

hibernate reverse engineering in Netbeans cannot find SQL Server tables

别等时光非礼了梦想. 提交于 2019-12-05 14:13:55
I have a Test SQL Server database installed on my machine. Created a test SQL Server account and two tables were created with this account in TestDb on the default schema. On my Java Web app (simple JSP) I am using Hibernate and configured it to point to the test database. However when I get to create the hibernate.reveng file the wizard does not find/display any available tables. Please see my hibernate config file: <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate

Parameter @x was not defined for stored procedure… with MS_SQL JDBC

ぃ、小莉子 提交于 2019-12-04 03:47:25
问题 I am trying to execute a stored procedure using SQL Server JDBC in a method: //Connection connection, String sp_name, Map<String, Object>params input to the method DatabaseMetaData dbMetaData = connection.getMetaData(); HashMap<String, Integer> paramInfo = new HashMap<String, Integer>(); if (dbMetaData != null) { ResultSet rs = dbMetaData.getProcedureColumns (null, null, sp_name.toUpperCase(), "%"); while (rs.next()) paramInfo.put(rs.getString(4), rs.getInt(6)); rs.close(); } String call = "{

What can cause the SQL Server JDBC error 'The value is not set for the parameter number 0' for an output parameter access?

主宰稳场 提交于 2019-12-04 03:28:22
I have some Java code that accesses SQL Server 2005 which looks something like this: CallableStatement cstmt = ...; ... // Set input parameters cstmt.registerOutParameter(11, Types.INTEGER); cstmt.execute(); int out = cstmt.getInt(11); And the following exception is thrown from the last line: com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 0. at com.microsoft.sqlserver.jdbc.SQLServerException. makeFromDriverError(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerCallableStatement. skipOutParameters(Unknown Source) at com.microsoft.sqlserver

Manifest.MF issue with MSSQLSERVER 2008 and Groovy

佐手、 提交于 2019-12-02 13:28:50
I have created a simple Groovy project in GGTS IDE that connects to Oracle and SQLServer. The Program runs fine within the IDE but when I run the program through the command line I seem to get some sort of enconding error in MANIFEST.MF?. See the stacktrace below: Command Line groovy -cp lib\ojdbc14_g.jar lib\sqljdbc4.jar src\Starter.groovy Result org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: C:\workspace-ggts-3.1.0.RELEASE\Test\lib\sqljdbc4.jar: 1: unexpected char: 0x3 @ line 1, column 3. PK♥ h?I@ ¶ META-INF/MANIFEST.MF¡|GôΓ┌▓εⁿD∞ ░=x/êsä 8◄o ï∟B▲ ë╔ ^ 1

What's the equivalent of JTDS properties in Microsoft JDBC?

馋奶兔 提交于 2019-12-02 08:54:50
问题 I am changing my JTDS connection to Microsoft JDBC, and I see some properties that exist on http://jtds.sourceforge.net/faq.html that do no exist in Microsoft JDBC https://docs.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-2017. Specifically, I am wondering about the equivalent properties in MS JDBC of: domain namedPipe useNTLMv2 回答1: Microsoft's JDBC driver for SQL Server does not support those options. It only supports TCP/IP (not named pipes), and

What's the equivalent of JTDS properties in Microsoft JDBC?

这一生的挚爱 提交于 2019-12-02 02:47:11
I am changing my JTDS connection to Microsoft JDBC, and I see some properties that exist on http://jtds.sourceforge.net/faq.html that do no exist in Microsoft JDBC https://docs.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-2017 . Specifically, I am wondering about the equivalent properties in MS JDBC of: domain namedPipe useNTLMv2 Microsoft's JDBC driver for SQL Server does not support those options. It only supports TCP/IP (not named pipes), and native Windows authentication (via sqljdbc_auth.dll) or Kerberos for SQL Server "Windows authentication"

Parameter @x was not defined for stored procedure… with MS_SQL JDBC

徘徊边缘 提交于 2019-12-01 19:46:55
I am trying to execute a stored procedure using SQL Server JDBC in a method: //Connection connection, String sp_name, Map<String, Object>params input to the method DatabaseMetaData dbMetaData = connection.getMetaData(); HashMap<String, Integer> paramInfo = new HashMap<String, Integer>(); if (dbMetaData != null) { ResultSet rs = dbMetaData.getProcedureColumns (null, null, sp_name.toUpperCase(), "%"); while (rs.next()) paramInfo.put(rs.getString(4), rs.getInt(6)); rs.close(); } String call = "{ call " + sp_name + " ( "; for (int i = 0; i < paramInfo.size(); i ++) call += "?,"; if (paramInfo.size

JDBC SQLServerException: “This driver is not configured for integrated authentication.”

放肆的年华 提交于 2019-12-01 02:04:23
I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC code in my debug environment, and it works fine. BUT When I put the server-side extension in the SFS "extensions" folder (as per spec), I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException : "This driver is not configured for integrated authentication.". I Googled for this error, and found that it's usually because the file sqljdbc_auth.dll is not in the system path; I have copied this file

JDBC SQLServerException: “This driver is not configured for integrated authentication.”

大憨熊 提交于 2019-11-30 22:20:09
问题 I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC code in my debug environment, and it works fine. BUT When I put the server-side extension in the SFS "extensions" folder (as per spec), I'm getting a com.microsoft.sqlserver.jdbc.SQLServerException : "This driver is not configured for integrated authentication.". I Googled for this error, and found

Classpath set, but: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

无人久伴 提交于 2019-11-28 12:20:40
Okay, I'm confused. My SQL Server JAR is here: Volume in drive C has no label. Volume Serial Number is 8008-2D93 Directory of c:\temp 03/07/2014 09:38 AM <DIR> . 03/07/2014 09:38 AM <DIR> .. 03/05/2014 10:34 PM 222,417 output.exd 02/17/2012 02:45 PM 563,117 sqljdbc.jar 02/17/2012 02:45 PM 584,207 sqljdbc4.jar 3 File(s) 1,369,741 bytes 2 Dir(s) 21,865,553,920 bytes free My Classpath is set: C:\WINDOWS\system32>echo %CLASSPATH% .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;c:\temp\sqljdbc4.jar Its a JDBC 4.0 driver, so I shouldn't need to do this, but I've tried setting the class name.