none
vb.net2010 参数化查询 RRS feed

  • 问题

  •  dim time as date=now

    dim b as integer=1,c as integer=2,d as integer=3,e as integer=4,f as integer=5,g as string="string"

     ……

    MyOledbCommand.CommandText = "Insert Into tablename " _
                & "(时间,编号,col3,col4,col5,col6,col6) " _
                & "Values (" _
                & "'" & time & "', " _
                & "'" & b & "', " _
                & "'" & c & "', " _
                & "'" & d & "', " _
                & "'" & e & "', " _
                & "'" & f & "', " _
                & "'" & g & "')"

    ……

    请教上述查询语句如何修改成参数化查询语句

    2013年4月11日 20:29

答案

全部回复