delete row in database

ganders

Active member
Joined
Nov 25, 2004
Messages
32
hi

the following code opens an oracle-connection, reads some tables to a dataset, adds or deletes somes rows...

adding rows works fine. but trying to delete rows, i allways get DataSet.HasChanges=false.

what am i missing?

best regards

george

Code:
Dim pOracleConnection As OracleConnection
Dim pCmdBuilder As OracleCommandBuilder
Dim pDS as New DataSet
Dim Table1 As OracleDataAdapter

pOracleConnection.Open()

Table1= New OracleDataAdapter("select * from table1", pOracleConnection)
Table1.Fill(pDS,"table1")
pCmdBuilder = New OracleCommandBuilder(table1)    

Dim pRows() As DataRow
Dim pRow As DataRow
pRows = table1.Select()
pRow=pRows(0)
table1.Rows.Remove(pRow)

Dim pUpdateDS As New DataSet
pUpdateDS = pDS.GetChanges  //pUpdateDS remains NOTHING!!!
table1.Update(pUpdateDS,"table1")
table1.AcceptChanges
 
Last edited by a moderator:
Back
Top