Created
March 26, 2014 18:16
-
-
Save kparms/9789770 to your computer and use it in GitHub Desktop.
Getting JTDS to work with Stored Proc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The main challenge I was running into was SSO: | |
| http://stackoverflow.com/questions/6356612/jtds-driver-not-working-for-sql-sever-2008r2-and-denali-native-sspi-library-not | |
| "Try by placing the ntlmauth.dll file in the bin folder of your Java Runtime Environment (e.g. C:\Program Files\Java\jre7\bin). | |
| I ran into the same issue using SQL Server Express 2008 R2 and this MSDN SQL Server Forum Article recommended this resolution, which worked for me." | |
| I downloaded JTDS-dist and copied the ntlmauth.dll into the jre/bin folder. | |
| The second challenge was the stored procedure did not return a result set, only a message, we got around that with the following: | |
| CallableStatement cstmt = conn.prepareCall("{call StoredProc @documentid=?,@tagdesc=?,@userid=?}"); | |
| cstmt.setString(1, "string"); | |
| cstmt.setString(2, "string"); | |
| cstmt.setString(3, "string"); | |
| cstmt.executeUpdate(); | |
| SQLWarning youveBeenWarned = cstmt.getWarnings(); | |
| System.out.println(youveBeenWarned.getMessage()); | |
| http://stackoverflow.com/questions/11463777/get-message-response-from-postgresql-using-jdbc | |
| http://stackoverflow.com/questions/3572626/calling-stored-procedure-from-java-jpa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment