Hi,
How do you call a stored procedure in Sybase 10 through MS RDO?
On the Sybase server, you can type
EXEC OPR_ACN_QUERY '0181-63931'
GO
and get some results.
I have tried two ways of getting a rdoResultset, with varying degrees of
failure.
(1) Calling the stored procedure as the source argument of my
rdoConnections(0).OpenResultset call
Dim results As rdoResultset
On Error GoTo DataRetrievalErrorHandler
Set results = rdoEnvironments(0).rdoConnections(0).OpenResultset( _
"EXEC OPR_ACN_QUERY '0181-63931'", _
rdOpenForwardOnly, rdConcurReadOnly)
The results.RowCount is "-1" meaning that the number of rows returned is
"not available".
(2) As a Prepared Statement
Dim prep_stmt As rdoPreparedStatement
Dim query As String
query = "{ call OPR_ACN_QUERY ( ? ) }"
Set prep_stmt =
rdoEnvironments(0).rdoConnections(0).CreatePreparedStatement("ACN_Query",
query)
prep_stmt.rdoParameters(0) = "' 0181-6391' "
Set results = prep_stmt.OpenResultset(rdOpenForwardOnly,
rdConcurReadOnly)
The ODBC driver reports that there is a syntax error in this case.
I' d appreciate any help. Thanks.
--