|
-
Jul 18th, 2006, 12:38 AM
#1
Thread Starter
Lively Member
[02/03] Access DataBase problem.....
Hi there
I have a data table named "test" on the Access Database named "My_First.mdb".
I did the followings.
(1) Public m_connection As New OleDb.OleDbConnection
public m_dataAdapter_test As New OleDb.OleDbDataAdapter
Public m_commandBuilder_test As OleDb.OleDbCommandBuilder
Public m_dt_test As New DataTable
(2) Opened the connnection "m_connection" using the correct connection
string
(3) m_dataAdapter_test = New OleDb.OleDbDataAdapter("Select * from test",
m_connection)
m_commandBuilder_test = New OleDb.OleDbCommandBuilder(m_dataAdapter_test)
m_dataAdapter_test.Fill(m_dt_test)
(4) Everthig was going ok, i could edit the entries on the database except one thing.
that's.......
Once i add a new row, the data adapter ("m_dataAdapter") is showing correctly that the new row's been added...
But when it's going to update it usting the following code.
"m_dataAdapter_test.Update(.m_dt_test)" it shows the following error.
An unhandled exception of type 'System.Data.DBConcurrencyException'
occurred in system.data.dll
Additional information: Concurrency violation: the UpdateCommand affected
0 records.
please help me to correct this error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|