这种情况严格来说是你的程序的问题,如果你把DTPicker取出的日期用FORMAT格式化一下是绝对不会出现这个问题的。

解决方案 »

  1.   

    Dim strsql As String
        Dim rssql As Recordset
        strsql = "insert into sell values('" + Text_sell_isbn.Text+ "',"
        strsql = strsql + "'" + Text_sell_name.Text + "',"
        strsql = strsql + "'" + Text_sell_concern.Text + "',"
        strsql = strsql + "'" + Text_sell_no.Text + "',"
        strsql = strsql + "'" + Text_sell_price.Text + "',"
        strsql = strsql + "'" + Text_sell_ma.Text + "',"
        strsql = strsql + "'" + Combo_sell_discount.Text + "',"
        strsql = strsql + "'" + Text_sell_shi.Text + "',"
        strsql = strsql + Format(DTPicker_sell_time.Value) + ","
        strsql = strsql + "'" + Text_sell_man.Text + "',"
        strsql = strsql + "'" + Text_sell_danhao.Text + "')"
        倒数第三行错了吗?怎么改?
      

  2.   

    sql="insert Tab_Test(F_Date,Msg) values ('"+format(DTPicker1,"yyyy-mm-dd")+"','"+trim(text1)+"')"
    con.execute sql
      

  3.   

    Dim strsql As String
        Dim rssql As Recordset
        strsql = "insert into sell values('" + Text_sell_isbn.Text+ "',"
        strsql = strsql + "'" + Text_sell_name.Text + "',"
        strsql = strsql + "'" + Text_sell_concern.Text + "',"
        strsql = strsql + "'" + Text_sell_no.Text + "',"
        strsql = strsql + "'" + Text_sell_price.Text + "',"
        strsql = strsql + "'" + Text_sell_ma.Text + "',"
        strsql = strsql + "'" + Combo_sell_discount.Text + "',"
        strsql = strsql + "'" + Text_sell_shi.Text + "',"
        strsql = strsql + "'" + Format(DTPicker_sell_time.Value,"yyyy-mm-dd") + "',"
        strsql = strsql + "'" + Text_sell_man.Text + "',"
        strsql = strsql + "'" + Text_sell_danhao.Text + "')"