以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  代码求助  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=105370)

--  作者:huli503
--  发布时间:2017/8/17 21:46:00
--  代码求助
 老师,帮我看下代码有点问题,
   Dim cmd As New SQLCommand
    cmd.C
    For Each r As Row In Tables("滑道构成_Table3").Rows
        If r IsNot Nothing Then
            For i As Integer = 1 To r("amount")
                cmd.commandtext ="Insert Into {part} ([partNo],[gelcoatColor],[thickness],[thickness2],[area],[size],[drawingNo],[partTemplateId],[productId],[remark,model],[state]) _
                Values( \'" &r("partNo")&"\',\'"&r("gelcoatColor")&"\',\'"&r("backColor")&"\',\'"&r("thickness")&"\', \'"&r("thickness2")&", _
                \'"&r("area")&"\',\'"&r("size")&"\',\'"&r("drawingNo")&"\',\'"&r("partTemplateId")&"\',\'"&r("productId")&"\',\'"&r("remark")&"\',\'"&r("model")&"\',"ll")"
                cmd.ExecuteNonQuery
                
            Next
        End If
    Next

--  作者:huli503
--  发布时间:2017/8/17 21:49:00
--  
出现这个错误
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20170817214729.png
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2017/8/17 21:55:00
--  

Dim cmd As New SQLCommand

For Each r As Row In Tables("滑道构成_Table3").Rows
    If r IsNot Nothing Then
        For i As Integer = 1 To r("amount")
            cmd.commandtext ="Insert Into {part} ([partNo],[gelcoatColor],[backColor],[thickness],[thickness2],[area],[size],[drawingNo],[partTemplateId],[productId],[remark],[model],[state]) " & _
            "Values( \'" & r("partNo") & "\',\'" & r("gelcoatColor") & "\',\'" & r("backColor") & "\',\'" & r("thickness") & "\', \'" & r("thickness2") & "," & _
            "\'" & r("area") & "\',\'" & r("size") & "\',\'" & r("drawingNo") & "\',\'" & r("partTemplateId") & "\',\'" & r("productId") & "\',\'" & r("remark") & "\',\'" & r("model") & "\',\'ll\')"
            output.show(cmd.CommandText)
            cmd.ExecuteNonQuery
        Next
    End If
Next


--  作者:huli503
--  发布时间:2017/8/17 22:15:00
--  
老师,运行出现这个错误
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20170817221341.png
图片点击可在新窗口打开查看

--  作者:有点甜
--  发布时间:2017/8/17 23:20:00
--  

Dim cmd As New SQLCommand

For Each r As Row In Tables("滑道构成_Table3").Rows
    If r IsNot Nothing Then
        For i As Integer = 1 To r("amount")
            cmd.commandtext ="Insert Into {part} ([partNo],[gelcoatColor],[backColor],[thickness],[thickness2],[area],[size],[drawingNo],[partTemplateId],[productId],[remark],[model],[state]) " & _
            "Values( \'" & r("partNo") & "\',\'" & r("gelcoatColor") & "\',\'" & r("backColor") & "\',\'" & r("thickness") & "\', \'" & r("thickness2") & "\'," & _
            "\'" & r("area") & "\',\'" & r("size") & "\',\'" & r("drawingNo") & "\',\'" & r("partTemplateId") & "\',\'" & r("productId") & "\',\'" & r("remark") & "\',\'" & r("model") & "\',\'ll\')"
            output.show(cmd.CommandText)
            cmd.ExecuteNonQuery
        Next
    End If
Next


--  作者:huli503
--  发布时间:2017/8/18 14:35:00
--  
谢谢