hello
could sombody tell mehow to insert values into a Parameter array. My codeis as follows. I am entering two values ( varchar2 and number type) from an array. I am getting an error at oraPArray1.putValue
I have refrenced OracleINProcess server
the code is as follows
Public Sub BatchInsertOra_Insert(VRow() As Variant)
Dim OraSession As OraSession
Dim OraDatabase As OracleInProcServer.OraDatabase
Dim strSQL As String
Dim oraPArray1 As Object
Dim oraPArray2 As Object
Dim startTime
Dim EndTime
Dim i As Integer
Set OraSession = CreateObject("OracleInProcServer.XOraSession"
Set OraDatabase = OraSession.OpenDatabase("bsdwd", "xpnolan/xpnolan7", 0)
OraDatabase.Parameters.AddTable "Ticker", 1, 1, 1000, 5
OraDatabase.Parameters.AddTable "Price", ORAPARM_INPUT, ORATYPE_NUMBER, 1000
Set oraPArray1 = OraDatabase.Parameters("Ticker"
Set oraPArray2 = OraDatabase.Parameters("Price"
OraDatabase.ExecuteSQL ("Delete from temp_dde_price"
startTime = Timer
For i = 1 To 1000
oraPArray1.put_values VRow(i, 1)
oraPArray2.put_values VRow(i, 2)
Next
OraDatabase.ExecuteSQL ("INSERT into temp_dde_price VALUES ticker, rice)"
EndTime = Timer
MsgBox "Insert time = " & EndTime - startTime
End Sub
Could somebody tell me the reason
could sombody tell mehow to insert values into a Parameter array. My codeis as follows. I am entering two values ( varchar2 and number type) from an array. I am getting an error at oraPArray1.putValue
I have refrenced OracleINProcess server
the code is as follows
Public Sub BatchInsertOra_Insert(VRow() As Variant)
Dim OraSession As OraSession
Dim OraDatabase As OracleInProcServer.OraDatabase
Dim strSQL As String
Dim oraPArray1 As Object
Dim oraPArray2 As Object
Dim startTime
Dim EndTime
Dim i As Integer
Set OraSession = CreateObject("OracleInProcServer.XOraSession"
Set OraDatabase = OraSession.OpenDatabase("bsdwd", "xpnolan/xpnolan7", 0)
OraDatabase.Parameters.AddTable "Ticker", 1, 1, 1000, 5
OraDatabase.Parameters.AddTable "Price", ORAPARM_INPUT, ORATYPE_NUMBER, 1000
Set oraPArray1 = OraDatabase.Parameters("Ticker"
Set oraPArray2 = OraDatabase.Parameters("Price"
OraDatabase.ExecuteSQL ("Delete from temp_dde_price"
startTime = Timer
For i = 1 To 1000
oraPArray1.put_values VRow(i, 1)
oraPArray2.put_values VRow(i, 2)
Next
OraDatabase.ExecuteSQL ("INSERT into temp_dde_price VALUES ticker, rice)"
EndTime = Timer
MsgBox "Insert time = " & EndTime - startTime
End Sub
Could somebody tell me the reason