Hi,
Please kindly help me. It does not add the row I inserted:
Thanks so much in advance...
Please kindly help me. It does not add the row I inserted:
Code:
Dim conn As New OleDb.OleDbConnection
Dim da As OleDb.OleDbDataAdapter
Dim ds As New DataSet
Dim sSQL As String
Dim sConnString As String
For Each fleDailyFiles In arrDailyFiles
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\DNC.mdb"
conn.ConnectionString = sConnString
conn.Open()
da = New OleDb.OleDbDataAdapter("SELECT * FROM DNC ORDER BY PhoneNum ASC", conn)
da.Fill(ds)
sSQL = "INSERT INTO DNC (phonenum) VALUES ('1234567890')"
da.InsertCommand = New OleDb.OleDbCommand(sSQL, conn)
da.Update(ds)
ds.GetChanges()
'This part works fine...
For Each Row As DataRow In ds.Tables(0).Rows
txtDisplayStatus.Text = txtDisplayStatus.Text & (Row(0)) & vbCrLf
Next
conn.Close()
Thanks so much in advance...