Skip to content

Commit

Permalink
Merge pull request #27 from dynamicweb/dbe/16841-FixDeleteTempTables
Browse files Browse the repository at this point in the history
dbe/16841-FixDeleteTempTables
  • Loading branch information
frederik5480 authored Dec 13, 2023
2 parents f386580 + 63b3cca commit 38b6389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>10.0.9</Version>
<Version>10.0.10</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Title>SQL Provider</Title>
<Description>SQL Provider</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/SQLDestinationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public virtual void FinishWriting()
public new virtual void Close()
{
string tableName = Mapping.DestinationTable.Name + tempTablePrefix;
SqlCommand.CommandText = "if exists (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'" + tableName + "') AND type in (N'U')) drop table " + tableName;
SqlCommand.CommandText = $"if exists (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{tableName}') AND type in (N'U')) drop table [{tableName}]";
SqlCommand.ExecuteNonQuery();
((IDisposable)SqlBulkCopier).Dispose();
if (duplicateRowsHandler != null)
Expand Down

0 comments on commit 38b6389

Please sign in to comment.