
Help - Using Sql Server Stored Proc with parameters
Hello,
I'm having some problems to use stored procedures with parameters. I'm
using VB 5.0 (SP3) and the version of crystal that was sold with VB. So
It's version 5.0 also
Here is my code:
Dim li_Ret As Integer
Dim ll_Ses As Long
crpRelat.ReportFileName = "P:\VB5\SPA\RELAT\MODELO.RPT"
crpRelat.Connect = "DSN=SPALAB02;UID=user;PSW=password;DBQ=spabanpara"
crpRelat.StoredProcParam(0) = "Teste"
crpRelat.StoredProcParam(1) = "19980930"
crpRelat.StoredProcParam(2) = "1001"
crpRelat.StoredProcParam(3) = "1"
crpRelat.StoredProcParam(4) = "Vazio"
li_Ret = crpRelat.PrintReport '--- ***********************
If li_Ret <> 0 Then
MsgBox crpRelat.LastErrorString
End If
When PrintReport was executed, then Crystal answered me, again, the values
of my stored procedure using a form, and that is something that I don't
want.
So, what is the problem with my code ?
Does crystal have some kind of property or should I put de code in a
especific order ?
In resume, I need to use Crystal Report with sql server stored procedures,
and those procedures could have parameters.
Thanks for help.
Ivan Tavares