我向acceess数据库中插入一条记录,出现了这样的错误:
标准表达式中数据类型不匹配
代码:
    Public Sub Insertdata(ByVal foodname As String)
        SqlConnection1.ConnectionString = ConfigurationSettings.AppSettings("StrConn") + Server.MapPath(ConfigurationSettings.AppSettings("data")) + ";"         oledbConnection1.Open()
        oledbCommand1.CommandText = "insert into Menued values(@username1 , @foodname1 , @ctime1, @quantity1)"
        oledbCommand1.Parameters.Add("@username1", OleDb.OleDbType.Char, 15)
        oledbCommand1.Parameters.Add("@foodname1", OleDb.OleDbType.Char, 30)        oledbCommand1.Parameters.Add("@ctime1", OleDb.OleDbType.Date, 4)
        oledbCommand1.Parameters.Add("@quantity1", OleDb.OleDbType.SmallInt, 2)
        oledbCommand1.Parameters("@username1").Value = Request.Cookies("username").Value
        oledbCommand1.Parameters("@foodname1").Value = foodname        oledbCommand1.Parameters("@ctime1").Value = Request.Cookies("ctime").Value
        oledbCommand1.Parameters("@quantity1").Value = 1
        oledbCommand1.ExecuteNonQuery()
        oledbConnection1.Close()
    End Sub
oledbconnection1 是oledbconnection  oledbcommand1 是oledbcommand 
我单独试过,放在我那个也面就不行了,我那也面也有一些对数据库的操作,都可以正常进行,
问题捆饶了很久,请高手指教是哪里的原因