Мир InterBase


Особенности реализации поддержки массивов - часть 3


Dim upd_cmd As New ADODB.Command

upd_cmd.ActiveConnection = cn

upd_cmd.CommandText = _

"update proj_dept_budget " & _

"set quart_head_cnt=:a pro]_aept_budget.quart_head_cnt " & _

"where year=:year and proj_id=:proj_id and dept_no=:dept_no"

upd_cmd.Parameters.Refresh

Dim qhc As Variant ' QUAD_HEAD_CNT

Dim i As Long, RowAffected As Long

While Not rs.EOF

If Not IsNull(rs("quart_head_cnt")) Then

qhc = rs("quart_head_cnt")

For i = LBound(qhc, 1) To UBound(qhc, 1)

qhc(i) = 10 * qhc(i)

Next i

upd_cmd("a") = qhc

upd_cmd("year") = rs("year")


upd_cmd ("proj_id" ) = rs ("proj_id")

upd_cmd("dept_no") = rs("dept_no")

upd_cmd.Execute RowAffected ' транзакционные изменения

Debug.Print ">" & CStr(RowAffected)

End If

rs.MoveNext

Debug.Print -------------------

Wend

en.CommitTrans




Начало  Назад  Вперед



Книжный магазин