Hi everyone, can anyone tell me how to store record from datagrid to oracle database at run time. user have to enter one record in datagrid at run time and the record should be saved at button click in the oracle.
manak chand :)
Hi everyone, can anyone tell me how to store record from datagrid to oracle database at run time. user have to enter one record in datagrid at run time and the record should be saved at button click in the oracle.
manak chand :)
Edit the following code and put it in the button routine:
Dim drRow As DataRow
Dim intRow As Integer = 0
If DataSet1.HasChanges Then
For Each drRow In DataSet1.Tables("TABLENAME").Rows
If drRow.RowState = DataRowState.Added Then
'add your SQL Statement for INSERT HERE
ElseIf drRow.RowState = DataRowState.Modified Then
' add your SQL Statement for UPDATE HERE
ElseIf drRow.RowState = DataRowState.Deleted Then
' add your SQL Statement for DELETE HERE
End If
intRow += 1
Next
after this just call your routine to pass the SQL code to the database.
how to call a trigger in VB.NET from ORACLE
Welcome @eminent123,
Please do not resurrect old threads. If you have any questions please ask. You are welcome to start your own threads.
Thread Locked.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.