about DataAdapter and Update command

  • Thread starter Thread starter Julia Sats
  • Start date Start date
J

Julia Sats

Hi,
This is code from MSDN help (OracleDataAdapter.UpdateCommand Property)

' Create the UpdateCommand.

cmd = New OracleCommand("UPDATE Dept SET DeptNo = pDeptNo, DName = pDName
" & _
"WHERE DeptNo = poldDeptNo", conn)

cmd.Parameters.Add("pDeptNo", OracleType.Number, 2, "DeptNo")
cmd.Parameters.Add("pDName", OracleType.NVarChar, 14, "DName")

parm = cmd.Parameters.Add("poldDeptNo", OracleType.Number, 2, "DeptNo")
parm.SourceVersion = DataRowVersion.Original

da.UpdateCommand = cmd


After information inside Dataset would be changed I can call Update method
for updating my DB, like it:

da.Update(myDataset)

but how I can pass parameters ??
and if I do not need to pass parameters why they need ?

I use Janus GridEx control and when I check RowState - information really
changed, but I can not update this information to DB

Thanks
 
Julia Sats said:
This is code from MSDN help (OracleDataAdapter.UpdateCommand
Property)

' Create the UpdateCommand.
[...]

This is a VB.NET language group. Would you please (is this polite enough?)
turn to the group microsoft.public.dotnet.framework.adonet because there are
the specialists.
 
Back
Top