none
Error: Data type mismatch in criteria Expression

    Pertanyaan

  • Tolong bisa dibantu?

    ketika mengklik tombol simpan, tidak mau tersimpan datanya dan muncul tulisan seperti di judul.

    kode programnya spti ini.

     Dim myCommand As New OleDbCommand
                Dim SQL As String
                Try
                    If Not CONN.State = ConnectionState.Open Then koneksi()
                    SQL = "INSERT INTO tools (tools_code, tools_name, description, purchase_date, jumlah) VALUES " & _
                              "('" & TextBox6.Text & "', '" & TextBox7.Text & "', '" & TextBox5.Text & "', '" & Format(DateTimePicker2.Value, "dddd/MM/dd,yyyy") & "', '" & TextBox8.Text & "')"

                    myCommand.Connection = CONN
                    myCommand.CommandText = SQL
                    myCommand.ExecuteNonQuery()

                    TextBox5.Text = String.Empty
                    TextBox6.Text = String.Empty
                    TextBox7.Text = String.Empty
                    TextBox8.Text = String.Empty
                    DateTimePicker2.Value = Format("dddd/MM/dd,yyyy")

                    Data_Load()
                    CONN.Close()
                Catch myerror As OleDbException
                    MessageBox.Show("Error: " & myerror.Message)
                Finally
                    CONN.Dispose()
                End Try

    apa yang salah datetimepickernya atau? >_<

    thanks :)

    17 April 2017 21:45

Semua Balasan