mssql-jdbc


insert varbinary value from hex literal in Microsoft SQL Server

六眼飞鱼酱① 提交于 2020-02-24 12:23:05
问题 I have a SpringBoot app, where I use jdbcTemplate to insert a row to a mssql int numOfRowsAffected = remoteJdbcTemplate.update("insert into dbo.[ELCOR Resource Time Registr_] " + "( [Entry No_], [Record ID], [Posting Date], [Resource No_], [Job No_], [Work Type], [Quantity], [Unit of Measure], [Description], [Company Name], [Created Date-Time], [Status] ) " + " VALUES (?,CONVERT(varbinary,?),?,?,?,?,?,?,?,?,?,?);", ELCORResourceTimeRegistr.getEntryNo(), ELCORResourceTimeRegistr.getEntryNo()),

Manifest.MF issue with MSSQLSERVER 2008 and Groovy

拥有回忆 提交于 2020-01-22 02:11:14
问题 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:

TDSParser: Encountered unexpected unknown token (0xA3)

馋奶兔 提交于 2020-01-16 08:43:37
问题 When calling some specific stored procedures using mssql-jdbc , I get an jdbc internal error in Java: Jan 02, 2020 8:11:32 AM com.microsoft.sqlserver.jdbc.TDSParser throwUnexpectedTokenException SCHWERWIEGEND: ConnectionID:5 ClientConnectionId: 30dcbc6e-ec5c-45ba-8801-1ecc549a0cd4: getNextResult: Encountered unexpected unknown token (0xA3) Jan 02, 2020 8:11:32 AM com.microsoft.sqlserver.jdbc.TDSReader throwInvalidTDSToken SCHWERWIEGEND: ConnectionID:5 ClientConnectionId: 30dcbc6e-ec5c-45ba

Access token connection fails after some time with Login failed NT AUTHORITY\ANONYMOUS LOGON error

早过忘川 提交于 2020-01-06 07:55:10
问题 I have a Spring web application on an Azure App service that is connecting to an Azure SQL DB using the Microsoft JDBC driver authenticating using an access token. It initially works find but after some time I start to get SQLServerException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' I'm following the steps outlined in the MS docs. AuthenticationContext context = new AuthenticationContext(mySTSUrl, false, Executors.newFixedThreadPool(1)); ClientCredential cred = new

Access token connection fails after some time with Login failed NT AUTHORITY\ANONYMOUS LOGON error

淺唱寂寞╮ 提交于 2020-01-06 07:54:04
问题 I have a Spring web application on an Azure App service that is connecting to an Azure SQL DB using the Microsoft JDBC driver authenticating using an access token. It initially works find but after some time I start to get SQLServerException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' I'm following the steps outlined in the MS docs. AuthenticationContext context = new AuthenticationContext(mySTSUrl, false, Executors.newFixedThreadPool(1)); ClientCredential cred = new

Same prepared statement, multiple databases, same schema

非 Y 不嫁゛ 提交于 2020-01-05 03:58:04
问题 I have multiple ms sql server databases x1, x2, x3, ... xn, effectively all the same schema type and one database y that is different and holds management data. I am using jdbc prepared statements and there are occasions when the same prepared statement needs to be executed on multiple x databases from one program at one occasion. If the prepared statement's SQL does not indicate a database: Is the prepared statement associated just with the server, and if executed is executed on a database

INSERT values in VARBINARY(MAX) column

我的梦境 提交于 2020-01-03 04:21:05
问题 I've table with VARBINARY(MAX) column and I'm tried for inserting value into that table.but I can't. QUERY is INSERT INTO [I_RACEDB].[dbo].[tce_lineno]([lineNo] ,[testCaseName] ,[project]) VALUES (<lineNo, varchar(250),> ,<testCaseName, varbinary(max),>,<project, varchar(100),>) INSERT INTO [I_RACEDB].[dbo].[tce_lineno] ([lineNo],[testCaseName],[project]) VALUES ('44','TestCase_TestCheck01_Mail_Validation','proj001') ERROR is: Implicit conversion from data type varchar to varbinary(max) is

Escape value in MSSQL Server with Java

末鹿安然 提交于 2019-12-25 06:36:34
问题 How can I escape a value for usage in a query to MSSQL Server? I know how it would be possible using JDBC but since I'm using SAP Business One DI API there is no way (I'm aware of) of using prepared statements. It would be sufficient to know how to escape string values while additionally knowing how to escape identifiers would be nice, too. Update : After reading New SQL Truncation Attacks And How To Avoid Them it seems sufficient to escape identifiers using [ (and doubling each occurrence of

Microsoft JDBC Driver is not working after upgrade from Java 1.7 to Java 1.8

谁说我不能喝 提交于 2019-12-25 00:35:29
问题 After upgrading from Java 1.7 to Java 1.8, I am getting the below error when having sqljdbc4.jar (version 4.0) in my build path. How can I resolve this problem? 回答1: In the details section of the download page for the driver, the Java compliance is listed: The Microsoft JDBC Driver 4.2 for SQL Server is JDBC 4.2 compliant and runs on the Java Development Kit (JDK) version 5.0, 6.0, 7.0, and 8.0 . The Microsoft JDBC Driver 4.1 for SQL Server is JDBC 4.0 compliant and runs on the Java

How to connect to remote MSSQL database using php 5.5.19

我是研究僧i 提交于 2019-12-24 13:50:31
问题 I have had a problem trying to establish a connection to a MSSQL database I created in Microsoft SQL Server Manager 2008 R2 using php 5.5.19 in XAMPP. In the php.ino configuration file under extensions, there is commented out a ';extension=php_mssql.dll'. I removed the comment and ran apache in the xampp control panel. Naturally an error occurred stating ''PHP Startup: Unable to load dynamic library '..\ext\php_mssql.dll cannot be found'. I looked in the ext directory and sure enough it wasn

工具导航Map