VBA: Run-time error 3001 Arguments Are Of The Wrong Type… when setting ADODB.Command object members

This forum post saved my day.I was trying to run Oracle stored procedure with output parameters from Excel VBA with the following piece of code: Dim cmd As ObjectDim resultSet As ObjectSet cmd = CreateObject(“ADODB.Command”)With cmd .CommandText = “PK_AUTH.LOGON” .NamedParameters = True .Parameters.Append .CreateParameter(“login”, adVarChar, adParamInput, 50, login_) .Parameters.Append .CreateParameter(“pass”, adVarChar, adParamInput, 50, pass_) .Parameters.Append […]

VBA: Prototype Class than connects to oracle and checks if connection is up. Plus VBA singleton pattern

Here some prototyping code of a class that is able to connect to Oracle through OleDB and to check if the connection is up before doing some application logic. Class name is TUploadHelper. Private m_conn As ObjectPrivate Function GetConn_() As Object If m_conn Is Nothing Then Set m_conn = CreateObject(“ADODB.Connection”) End If Set GetConn_ = […]