Dear Colleagues,

Please do me ur favor to completed this code :

Code:
Private Sub Command1_Click()
     Dim rep as CRADXDRT.Report
     Dim Cry As New CRADXDRT.Application
     Dim SQL As String
     
     Set rep = Cry.OpenReport(App.Path + "\Report\rptCrf.rpt")
     
     SQL = .................................. (Code to connect with SQL Server)
     
    rep.SQLQueryString = SQL
    rep.DischardSavedData
    CRV.ReportSource = rep
    CRV.RefreshEX True
    CRV.ViewReport
    CRV.Zoom 100
End sub
I'm using StoredProcedure with name "ShowRequisitionCurent"
with Primary key @CurMS


I need VB Code to get connection between VB6 to CR10 using MS SQL database.

Obviously, I Always get a problem with Log on to Server.