首页 > 解决方案 > 进入插入查询:索引(从零开始)必须大于或等于零且小于参数列表的大小

问题描述

我正在尝试使用以下查询插入数据 -

INSERT INTO table (id,code, responses_bitstring, responses_double, responses_text) VALUES('1', '1',null, '{1,5,6,9}',null);

使用 -

ExecuteSqlCommand(query);

执行时我遇到错误 -

Index (zero based) must be greater than or equal to zero and less than the size of the argument list. 

我知道错误是因为“{1,5,6,9}”这会开始搜索特定索引。有什么方法可以执行相同的查询吗?

标签: c#.net.net-core

解决方案


推荐阅读