Help - Using Sql Server Stored Proc with parameters 
Author Message
 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



Mon, 26 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Datetime Parameter to SQL Server stored proc

2. multiple parameters with ADO and SQL Server 2000 Stored proc

3. know anything about Stored Proc and using SQL Server 2000, CR8.5 and VB6.0

4. Crystal report using SQL stored proc locks server!!

5. Retrieving Output Parameters from SQL Stored Proc

6. Receiving Output Parameters from SQL stored proc

7. How to passing parameters from and to a SQL Server stored procedure using ADO

8. Problem passing parameters to MSSQL Svr stored proc using API

9. Stored Proc Return values / Output Params w ADO and SQL Server 7

10. SQL Server stored proc to VB Source generator

11. Stored Proc Return values / Output Params w ADO and SQL Server 7

12. SQL Server stored proc to VB Source generator

 

 
Powered by phpBB® Forum Software