日期:2014-05-18 浏览次数:20548 次
cmdSQL.Parameters.Clear()
cmdSQL.Parameters.Add("@text", OleDbType.WChar).Value = txtText.Text
cmdSQL.Parameters.Add("@user", OleDbType.WChar).Value = lbName.Text
cmdSQL.Parameters.Add("@score", OleDbType.Integer).Value = intScore
cmdSQL.Parameters.Add("@firsttime", OleDbType.Date).Value = nowTime
cmdSQL.Parameters.Add("@lasttime", OleDbType.Date).Value = nowTime
cmdSQL.Parameters.Add("@body", OleDbType.WChar).Value = txtBody.Text
cmdSQL.Parameters.Add("@state", OleDbType.WChar).Value = strState
cmdSQL.Parameters.Add("@type", OleDbType.WChar).Value = strTypeID
cmdSQL.CommandText = "INSERT INTO topic([text], [user], score, rep, firsttime, lasttime, body, state, type)" & _
" VALUES(?,?,?,0,?,?,?,?,?)"
cmdSQL.ExecuteNonQuery()