大师:下面的代码就是显示8,哪里的错误有?
Dim glwljh As new List(of DataRow)
glwljh = DataTables("gljytjbhb").Select("gljytjb1 is not null","_sortkey")
Try
Connections(hbconn).BeginTransaction() '开始事务
Dim cmd As New SQLCommand
cmd.ConnectionName = hbconn
For Each tr As DataRow In glwljh
cmd.CommandText = "Insert Into {dtjymxb} (dtjymxb1,dtjymxb2,dtwlmxb3,dtjymxb4,dtjymxb6,dtjymxb7,dtjymxb8,dtjymxb9,dtjymxb10" & _
",dtjymxb11,dtjymxb12,dtjymxb14,dtjymxb15,dtjymxb16,dtjymxb17,dtjymxb18,dtjymxb19,dtjymxb20,dtjymxb21,dtjymxb22,dtjymxb23,dtjymxb24" & _
",dtjymxb26,dtjymxb27,dtjymxb29,dtjymxb30,dtjymxb32,dtjymxb33,dtjymxb35,dtjymxb36,dtjymxb38" & _
",dtjymxb39,dtjymxb40,dtjymxb43,dtjymxb44,dtjymxb45,dtjymxb46,dtjymxb47,dtjymxb48,dtjymxb49,dtjymxb50,dtjymxb51,dtjymxb52" & _
",dtjymxb54,dtjymxb55,dtjymxb57,dtjymxb58,dtjymxb60,dtjymxb61,dtjymxb63,dtjymxb64,dtjymxb66" & _
",dtjymxb67,dtjymxb68,dtjymxb69,dtjymxb72,dtjymxb73,dtjymxb74,dtjymxb75,dtjymxb76,dtjymxb77,dtjymxb78,dtjymxb79" & _
",dtjymxb81,dtjymxb82,dtjymxb84,dtjymxb85,dtjymxb87,dtjymxb88,dtjymxb90,dtjymxb91,dtjymxb93,dtjymxb5" & ") Values('" & _
tr("gljytjb1") & "','" & tr("gljytjb2") & "--" & tr("gljytjb3") & "','" & tr("gljytjb4") & "','" & tr("gljytjb6") & "','" & tr("gljytjb7") & _
"','" & tr("gljytjb11") & "','" & tr("gljytjb12") & "','" & tr("gljytjb13") & "','" & tr("gljytjb14") & "','" & tr("gljytjb15") & "','" & tr("gljytjb16") & _
"','" & tr("gljytjb17") & "','" & tr("gljytjb18") & "','" & tr("gljytjb19") & "','" & tr("gljytjb20") & "','" & tr("gljytjb21") & "','" & tr("gljytjb22") & _
"','" & tr("gljytjb23") & "','" & tr("gljytjb24") & "','" & tr("gljytjb25") & "','" & tr("gljytjb26") & "','" & tr("gljytjb27") & "','" & tr("gljytjb28") & _
"','" & tr("gljytjb29") & "','" & tr("gljytjb30") & "','" & tr("gljytjb31") & "','" & tr("gljytjb32") & "','" & tr("gljytjb33") & "','" & tr("gljytjb34") & _
"','" & tr("gljytjb35") & "','" & tr("gljytjb36") & "','" & tr("gljytjb37") & "','" & tr("gljytjb38") & "','" & tr("gljytjb39") & "','" & tr("gljytjb40") & _
"','" & tr("gljytjb41") & "','" & tr("gljytjb42") & "','" & tr("gljytjb43") & "','" & tr("gljytjb44") & "','" & tr("gljytjb45") & "','" & tr("gljytjb46") & _
"','" & tr("gljytjb47") & "','" & tr("gljytjb48") & "','" & tr("gljytjb49") & "','" & tr("gljytjb50") & "','" & tr("gljytjb51") & "','" & tr("gljytjb52") & _
"','" & tr("gljytjb53") & "','" & tr("gljytjb54") & "','" & tr("gljytjb55") & "','" & tr("gljytjb56") & "','" & tr("gljytjb57") & "','" & tr("gljytjb58") & _
"','" & tr("gljytjb59") & "','" & tr("gljytjb60") & "','" & tr("gljytjb61") & "','" & tr("gljytjb62") & "','" & tr("gljytjb63") & "','" & tr("gljytjb64") & _
"','" & tr("gljytjb65") & "','" & tr("gljytjb66") & "','" & tr("gljytjb67") & "','" & tr("gljytjb68") & "','" & tr("gljytjb69") & "','" & tr("gljytjb70") & _
"','" & tr("gljytjb71") & "','" & tr("gljytjb72") & "','" & tr("gljytjb73") & "','" & tr("gljytjb74") & "','" & tr("gljytjb75") & "','" & tr("gljytjb76") & _
"','" & tr("dtjymxb1") & "--" & tr("dtjymxb3") & "')"
cmd.ExecuteNonQuery()
Next
Connections(hbconn).Commit '提交事务,所有操作生效
Catch ex As Exception '如果出错
MessageBox.Show(8)
Connections(hbconn).Rollback() '回滚事务,撤销所有操作
End Try