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
CLICKHOUSE FIELD IS DEFINED LIKE THIS: PrintTicketLimitMoney Nullable(Decimal(9, 4)),
When i try to insert row:
foreach (DataRow row in table.Rows)
{
insertCommand.Parameters.Clear();
Check the library version you use. Fixed length Decimal is supported since 1.1.15, since 1.2.3 they have improved precision (although still only fixed lengths are supported), support for arbitrary precision decimals came in 1.4.0 and after that they didn't change.
Plus, as far as I see you're doing inserts row-by-row, which is completely wrong for Clickhouse. Consider switching to bulk inserts.
And if you still encounted errors in most recent library versions, please provide table deifnition (CREATE command you used), and failing command text too.
Thanks your answer!
for more table in my sqlserver, i read your readme.md about the bulk function like
var command=connection.CreateCommand();
command.CommandText="INSERT INTO test (date,time,str,int) VALUES @bulk";
command.Parameters.Add(new ClickHouseParameter{
ParameterName="bulk",
Value=list
});
command.ExecuteNonQuery();
now i want to use like
BulkInsert(DataTable, tableName), not want to define more class T.
how to solve it.
Plus, as far as I see you're doing inserts row-by-row, which is completely wrong for Clickhouse. Consider switching to bulk inserts.
And if you still encounted errors in most recent library versions, please provide table deifnition (CREATE command you used), and failing command text too.
Description
CLICKHOUSE FIELD IS DEFINED LIKE THIS:
PrintTicketLimitMoney
Nullable(Decimal(9, 4)),When i try to insert row:
foreach (DataRow row in table.Rows)
{
insertCommand.Parameters.Clear();
... System.NotSupportedException:“Unknown column type Decimal(9, 4)”
how to solve it.
The text was updated successfully, but these errors were encountered: