ADO and Informix Stored Procedures
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET
I have a stored procedure that returns a 60 character string and requires string passed as input. How can i get this value returned via ADO. Does this require a Command object, or just a Connection or a Recordset even? I keep getting a "Missing Default Property" when i try to use the Command object's execute method with the CommandText Property set to "procedurename('paramater')" and the active connection set to the Informix ODBC driver. Is there a better way? -Matthew
Mathew, Just started on this myself, but this should work ok Set adcProcedure = New ADODB.Command set rsProcResult as new ADODB.Recordset With adcProcedure .CommandText = procedureName .CommandType = adCmdStoredProc .ActiveConnection = YourActiveConnection .Parameters.Refresh .parameters(1).value = "String to pass in" end with Set rsProcResult = adcProcedure.execute ReturnParameter = rsProcResult.fields(1) rsProcResult.close Return parameters for stored procedures come back as fields in a recordset object. Good Luck ! Paul Matthew wrote in message ... >I have a stored procedure that returns a 60 character string and requires >string passed as input. How can i get this value returned via ADO. Does this >require a Command object, or just a Connection or a Recordset even? I keep >getting a "Missing Default Property" when i try to use the Command object's >execute method with the CommandText Property set to >"procedurename('paramater')" and the active connection set to the Informix >ODBC driver. Is there a better way? > >-Matthew > > >