part2: Business Objects stored procedure(DB2 for OS/390 V6.1) parameter passing proble

Kadir Guray Meric

part2: Business Objects stored procedure(DB2 for OS/390 V6.1) parameter passing proble
Hi to everyone in the list, again.
This is the second part of my stored procedure passing parameter problem with business objects.
'Continuation of Public Sub DSSResult(dpInterface As DpVBAInterface)
' TODO: Add VBA Data Provider code here.
' THIS PART OF SOURCE CODE DISPLAYS RESULTSET ON BUSINESS OBJECT REPORT
Dim myCube As DpVBACube
Dim myColumns As busobj.DpVBAColumns
Dim myColumn As DpVBAColumn
Set myCube = dpInterface.DpVBACubes.Item(1)
Set myColumns = myCube.DpVBAColumns
myColumns.SetNbColumns (3)
myColumns.NbLines = 1
Set myColumn = myColumns.Item(1)
myColumn.Qualification = boDimension
myColumn.Name = "TABLENAME" 'Dimension name
Set myColumn = myColumns.Item(2)
myColumn.Qualification = boDimension
myColumn.Name = "DATABASENAME" 'Dimension name
Set myColumn = myColumns.Item(3)
myColumn.Qualification = boDimension
myColumn.Name = "TABLESPACENAME" 'Dimension name
myColumns.AddLine (myArr) 'MYARR array, (resultset) is added toBUSINESS OBJECTS REPORT
AdoError:
If Err.Description <> "" Then
MsgBox Err.Description
End If
'Err.Description
End Sub
from tools option, I choose references, then Microsoft Activex Data Access Objects 2.0 library.Then, save this code and report, press run. Every time I press refresh, stored procedure refreshes.
When I use
Set ADO_RS = ADO_Comm.Execute
then ADO_RS.RecordCount always return -1. I can never have number of records
returned from stored procedures in Business Objects with Set ADO_RS =
ADO_Comm.Execute
Has anybody know how to get number of records returned from storedprocedures with ADO execute method(Set ADO_RS = ADO_Comm.Execute)?
I know that ADO_RS.RecordCount method works only if Ado_RS is opened with below sytax:
Set ADO_RS = New ADODB.Recordset
ADO_RS.Open "DDB2.DSN8ES3", ADO_Conn, adOpenKeyset, adLockOptimistic, 4
But if I use this method, it gives again the same error:
"Error during SQL execution : DA000
[IBM][CLI Driver][DB2] SQL0440N No function by the name "DSN8ES3" having
compatible arguments was found in the function path. SQLSTATE=42884
:-440
I think, ADO recordsets which are defined to be Set ADO_RS = New
ADODB.Recordset could not find stored procedure qualifier+name
DDB2.DSN8ES3. (Altough I use bind parameter (DDB2), it still can not
find DSN8ES3). Path option adds qualifier name to current program, but it
gets error.
If I succesfully get the number of records from a stored procedure, I will
use this value to redimension the resultset array to :
Dim myArr(100, 2) As Variant --->I assume stored procedure returns at most
100 rows, I can display only first 100 rows
this code would be replaced by:
Dim myArr() As Variant
ReDim Preserve myArr(numberofrecords, 2)--->I can store all the records in
resultset now.
Has anybody ever succeeded in calling DB2 for OS/390 stored
procedures(having input-output parameters) from Business Objects Visual
Basic Procedures part or from any Visual Basic Application with a syntax
like below:
Set ADO_RS = New ADODB.Recordset
ADO_RS.Open "DDB2.DSN8ES3", ADO_Conn, adOpenKeyset, adLockOptimistic, 4
if succeded, has the ADO_RS.RecordCount returned the correct number ( a
number different from -1) of record numbers in resultset?
Regards.