No veo error alguno salvo el bug
comentado en las MSDN de mocosoft al parecer hay que establecer el Parameter.Size para los parámetros de texto
Ya me contarás si es cierto. Aunque es código VB, al ser fallo del ADO, digo yo que se podrá solucionar por delphi tambien.
Cita:
With Cmd2
Set .ActiveConnection = Conn
.CommandText = "CustomerByID"
.CommandType = adCmdStoredProc
End With
Cmd2.Parameters.Refresh
Cmd2.Parameters(0).Type = adVarChar
Cmd2.Parameters(0) = "COMMI" 'Set the text parameter value.
' If the next line is omitted you will get an error 3708 -
' "The application has improperly defined a Parameter Object".
Cmd2.Parameters(0).Size = 5
Rs.Open Cmd2, , adOpenStatic, adLockReadOnly
Debug.Print Rs(0), Rs(1), Rs(2)
Rs.Close
|
Un saludo y suerte