Home > Net >  Of the data which mysqlCommandBuilder since the back problem
Of the data which mysqlCommandBuilder since the back problem

Time:10-06



Above Id is the identity column, since increased with mySqlCommandBuilder (daDetail) automatically generated insertcommand statements, in order to back @ @ identity data, add insertcomand.com mandText behind "; Select @ @ identity as id ", but found that changed his statement doesn't work completely, id value shown in datagridview,

Consult everybody greatly, how do I modify, in order to achieve my request

Dim cbDetail As New MySqlCommandBuilder (daDetail)
DaDetail. InsertCommand=cbDetail. GetInsertCommand
DaDetail.InsertCommand.Com mandText=daDetail.InsertCommand.Com mandText & amp; "; Select @ @ identity as id "
DaDetail. Update (dtDetail)
DtDetail. AcceptChanges ()

CodePudding user response:

Now, back to read the entire datatable

DaDetail. Update (dtDetail)
DtDetail. AcceptChanges ()
DaDetail. The fill (dtDetail)
According to the efficiency of the poor

CodePudding user response:

Read id, direct change dtDetail,
On the AcceptChanges (before)
  • Related