VB网表适配器插入查询不起作用

时间:2015-06-09 10:39:25

标签: vb.net insert-into

在同一个表(表适配器)上更新查询工作正常,但在插入查询中我收到此错误:

命令参数[2]"由于符号不匹配或数据溢出以外的原因,无法转换数据值。

这是来自tableadapter的查询:

INSERT INTO CurrencyRate(CurrencyRateID, CurrencyCode, ValidFromDate, ValidToDate, EnteredBy, Rate, DeptID, ExportMarker) VALUES        (?, ?, '9/6/2015', '12/31/2099', 1, ?, 1, 1)

这是表格中的(部分)代码:

If currencyAttribute <> "USD" Then
                Try
                    'MsgBox("insert into = " & NewPK & " / " & currencyAttribute & " / " & frDate & " / " & toDate & " / " & rateAttribute)
                    scalarQueriesTableAdapter.InsertIntoCurrency(NewPK, currencyAttribute, rateAttribute)
                Catch ex As Exception
                    MsgBox("Error occured when inserting new line into currencyrate table." _
                          & vbNewLine & vbNewLine _
                          & ex.Message)
                End Try
            End If

尽我所能来诊断哪个参数不能正确?所有参数似乎都很好......?!?!?!???

0 个答案:

没有答案