You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rolled back due to error:
Exception calling "ExecuteNonQuery" with "0" argument(s): "SQL logic error or missing database
near "-": syntax error"
At C:\Path\To\PSSQLite\Invoke-SqliteBulkCopy.ps1:280 char:29
+ Throw "Rolled back due to error:`n$_"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Rolled back due...: syntax error":String) [], RuntimeException
+ FullyQualifiedErrorId : Rolled back due to error:
Exception calling "ExecuteNonQuery" with "0" argument(s): "SQL logic error or missing database
near "-": syntax error"
I think I've fixed it, by creating parameters, where every non-alphanumeric character in column's name is converted to it's charcode string and then everything is joined with underscore.
For example, the column Echo👻Foxtrot, with "ghost in the PowerShell" (which consists of two surrogate pairs) will have parameter named Echo_55357_56443_Foxtrot.
I've also added some escaping with single quotes (') where necessary.
I'll do a proper pull-request soon.
The text was updated successfully, but these errors were encountered:
Here goes another pull-request, because while I've fixed parameters' names, the column names and table name should have single quote escaped, which was not.
Here is a repro script:
It fails with this error:
I think I've fixed it, by creating parameters, where every non-alphanumeric character in column's name is converted to it's charcode string and then everything is joined with underscore.
For example, the column
Echo👻Foxtrot
, with "ghost in the PowerShell" (which consists of two surrogate pairs) will have parameter namedEcho_55357_56443_Foxtrot
.I've also added some escaping with single quotes (
'
) where necessary.I'll do a proper pull-request soon.
The text was updated successfully, but these errors were encountered: