Hi,
How can I execute a stored procedure on oracle ?
I created a stored procedure with 5 parameters. But when I execute it, I get an error message : -2147217887
"ODBC driver does not support the requested properties."
[Namespace=VbErr][Description=ODBC driver does not support the requested properties.][Number=-2147217887][Source=Microsoft OLE DB Provider for ODBC Drivers]
This is my code
Dim cmdSQL As New ADODB.Command
Dim strConn As String
Dim cnnDB As ADODB.Connection
cmdSQL.Parameters.Append cmdSQL.CreateParameter(pSelectedGasDay, adDBDate, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionCreateUser, adBSTR, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionCreateDate, adDBDate, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(AppGetComputerNameCached, adBSTR, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionId, adNumeric, adParamInput)
' Set up a command object for the stored procedure.
cmdSQL.CommandText = "SP_T.ImportTrdVal"
cmdSQL.CommandType = adCmdStoredProc
Set cnnDB = New ADODB.Connection
strConn = "DSN=" & AppGetDSN & ";User ID=" & SecCurrentUserGetUserToken.mbLogin & ";Password=" & SecCurrentUserGetUserToken.mbPassword & " ;"
cnnDB.Open strConn
'Set the connection for the command to your opened connection
cmdSQL.ActiveConnection = cnnDB
'Execute the command
cmdSQL.Execute
'Close the connection
cnnDB.Close
Can someone help me please
How can I execute a stored procedure on oracle ?
I created a stored procedure with 5 parameters. But when I execute it, I get an error message : -2147217887
"ODBC driver does not support the requested properties."
[Namespace=VbErr][Description=ODBC driver does not support the requested properties.][Number=-2147217887][Source=Microsoft OLE DB Provider for ODBC Drivers]
This is my code
Dim cmdSQL As New ADODB.Command
Dim strConn As String
Dim cnnDB As ADODB.Connection
cmdSQL.Parameters.Append cmdSQL.CreateParameter(pSelectedGasDay, adDBDate, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionCreateUser, adBSTR, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionCreateDate, adDBDate, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(AppGetComputerNameCached, adBSTR, adParamInput)
cmdSQL.Parameters.Append cmdSQL.CreateParameter(lVersionId, adNumeric, adParamInput)
' Set up a command object for the stored procedure.
cmdSQL.CommandText = "SP_T.ImportTrdVal"
cmdSQL.CommandType = adCmdStoredProc
Set cnnDB = New ADODB.Connection
strConn = "DSN=" & AppGetDSN & ";User ID=" & SecCurrentUserGetUserToken.mbLogin & ";Password=" & SecCurrentUserGetUserToken.mbPassword & " ;"
cnnDB.Open strConn
'Set the connection for the command to your opened connection
cmdSQL.ActiveConnection = cnnDB
'Execute the command
cmdSQL.Execute
'Close the connection
cnnDB.Close
Can someone help me please