Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle/VB....can't we all just get along?
How about batch update:
Dim strSQL as string
Dim oraPArray1 as Object
Dim oraPArray2 as Object
Dim iCounter as integer
oraDatabase.Parameters.AddTable "Names", ORAPARM_INPUT, ORATYPE_VARCHAR2,
100, 20
oraDatabase.Parameters.AddTable "UserIDs", ORAPARM_INPUT, ORATYPE_NUMBER,
100
Set oraPArrary1 = oraDatabase.Parameters("Names") Set oraPArrary2 = oraDatabase.Parameters("UserIDs")
For iCounter= 0 TO 99
oraPArrary1.put_Value YourValueArray1(iCounter), iCounter oraPArrary1.put_Value YourValueArray2(iCounter), iCounter Next iCounter
oraDatabase.ExecuteSQL ( "UPDATE Users Set Name = :Name WHERE User_ID = :UserID" )
Another way is you create a PL/SQL stored procedure with table parameters abd call it from VB. It's fater.
BTW, This code is using OO4O.
Hope helps
Quark Received on Wed May 26 1999 - 19:44:49 CDT
![]() |
![]() |