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
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