Driver version or jar name
mssql-jdbc:6.4.0-jre8
Problem description
When attempting to bulk upload to a table with ' in the name the upload fails with:
com.microsoft.sqlserver.jdbc.SQLServerException: Unable to retrieve column metadata.
at
com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.getDestinationMetadata(SQLServerBulkCopy.java:1781)
The code does queries such as:
select collation_name from sys.columns where " + "object_id=OBJECT_ID('" + destinationTableName + "')
Which fails because destinationTableName contains unescaped '
Driver version or jar name
mssql-jdbc:6.4.0-jre8
Problem description
When attempting to bulk upload to a table with
'in the name the upload fails with:com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.getDestinationMetadata(SQLServerBulkCopy.java:1781)
The code does queries such as:
Which fails because
destinationTableNamecontains unescaped'