Public Class Form1

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Dim SumberDb As String = "Data Source=c:\users\ogieuntung\documents\visual studio 2010\Projects\Local Database Daftar Kontak\Local Database Daftar Kontak\DB.sdf"
    'SumberDb akan menunjukan Alamat Database 
    Dim Ogieuntung As New System.Data.SqlServerCe.SqlCeConnection(SumberDb)

    Dim TransaksiDb As System.Data.SqlServerCe.SqlCeTransaction

    TransaksiDb = Ogieuntung.BeginTransaction()
    'Setelan Koneksi "Ogieuntung".BeginTransaction berarti anda telah berhasil membuka Database
    'MsgBox("Database telah Terbuka..")

    Dim TugasDb As New System.Data.SqlServerCe.SqlCeCommand("inser into anggota (nama,password) values ('Nabil','1234')", Ogieuntung, TransaksiDb)

    **TugasDb.ExecuteNonQuery() 'ERROR HERE!**
    MsgBox("Data anda telah dimasukan ke Database!")

End Sub

End Class


Missing "t" on the keyword INSERT

"inser into anggota (nama,password) values ('Nabil','1234')"

Not the answer you're looking for? Browse other questions tagged or ask your own question.