|
|
Question : Excel VBA Error - "ODBC driver does not support the requested properties."
|
|
Hi the below code causes the following error when it hit's the .Execute line:
Error : "ODBC driver does not support the requested properties."
Code ------
Private Sub UploadInstrument(sAction As String, iDesk As Integer, _ iImnt As Long, dAmountIssued As Double, _ sComments As String, _ sPercentCertFlag As String) Dim cmd As ADODB.Command Dim prmAction As ADODB.Parameter Dim prmDesk As ADODB.Parameter Dim prmImnt As ADODB.Parameter Dim prmAmountIssued As ADODB.Parameter Dim prmComments As ADODB.Parameter Dim prmPercentCertFlag As ADODB.Parameter 'Error bubbles up to calling sub Set cmd = New ADODB.Command On Error GoTo ErrHandler With cmd .CommandType = adCmdStoredProc .CommandText = "dbo.cockpit_setInventory" .ActiveConnection = GetConnection() Set prmAction = .CreateParameter("@id_action", adVarChar, adParamInput, 6, sAction) Set prmDesk = .CreateParameter("@id_desk", adInteger, adParamInput, Len(iDesk), iDesk) Set prmImnt = .CreateParameter("@id_imnt", adBigInt, adParamInput, Len(iImnt), iImnt) Set prmAmountIssued = .CreateParameter("@am_issued", adDouble, adParamInput, Len(dAmountIssued), dAmountIssued) Set prmComments = .CreateParameter("@tx_comments", adVarChar, adParamInput, 255, sComments) Set prmPercentCertFlag = .CreateParameter("@id_percent_cert_flag", adVarChar, adParamInput, 1, sPercentCertFlag) .Parameters.Append prmAction .Parameters.Append prmDesk .Parameters.Append prmImnt .Parameters.Append prmAmountIssued .Parameters.Append prmComments .Parameters.Append prmPercentCertFlag ' Execute the request .Execute End With Set cmd = Nothing Exit Sub
ErrHandler: MsgBox Err.Description, vbCritical + vbOKOnly, "Error Database Command Execution"
|
Answer : Excel VBA Error - "ODBC driver does not support the requested properties."
|
|
I'm thinking there is something wrong in the mapping of your code to the SP.
|
|
|
|
|