M
massimo capetola
I'm a Vb.net beginner developer and I want to insert records in a table(SQL
CE db) with ADO.net. I have wrotten this code :
Dim ConnDB As New SqlServerCe.SqlCeConnection
Dim daMessage As New SqlServerCe.SqlCeDataAdapter("Select * From ReleEV",
ConnDB)
Dim tblMessage As New DataTable("ReleEV")
Dim dsGepda As New DataSet("ReleEV")
ConnDB.ConnectionString = "Data Source=" & G_Path & "\GEPDA.sdf"
ConnDB.Open()
daMessage.Fill(dsGepda, "ReleEV")
tblMessage = dsGepda.Tables("ReleEV")
drCurrent = tblMessage.NewRow()
drCurrent("Num_mess") = 1 'int field
drCurrent("Des") = "Test" 'nvarchar filed
tblMessage.Rows.Add(drCurrent)
I have no errors, but no records are added in my table "ReleEV".
Any suggestions??
CE db) with ADO.net. I have wrotten this code :
Dim ConnDB As New SqlServerCe.SqlCeConnection
Dim daMessage As New SqlServerCe.SqlCeDataAdapter("Select * From ReleEV",
ConnDB)
Dim tblMessage As New DataTable("ReleEV")
Dim dsGepda As New DataSet("ReleEV")
ConnDB.ConnectionString = "Data Source=" & G_Path & "\GEPDA.sdf"
ConnDB.Open()
daMessage.Fill(dsGepda, "ReleEV")
tblMessage = dsGepda.Tables("ReleEV")
drCurrent = tblMessage.NewRow()
drCurrent("Num_mess") = 1 'int field
drCurrent("Des") = "Test" 'nvarchar filed
tblMessage.Rows.Add(drCurrent)
I have no errors, but no records are added in my table "ReleEV".
Any suggestions??