Stored procedure does not return data if executed from VBA

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-01-13T05:29:19Z Indexed on 2010/05/09 20:28 UTC
Read the original article Hit count: 178

I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code..

Dim dbCon As ADODB.Connection
Dim rstTemp As New ADODB.Recordset
Dim query As String
query = "exec MySP '01/01/2010', '01/14/2010'"
dbCon.Open connectionString, "username" "password"
dbCon.CommandTimeout = 300
rstTemp.Open query, dbCon, adOpenForwardOnly

The code was working well with old sp. What could be the problem ? any idea ?

Thanks in Advance.

© Stack Overflow or respective owner

Related posts about stored-procedures

Related posts about vba