I am there are difficulty makes report with crystal report 8.5 and database sql server 2000 with vb 6.0, when I am connecting report with database failed, message ” Cannot Open SQL Server”, syntac which I apply :
Dim cnn As New ADODB.Connection
Const Cont = “Provider=SQLOLEDB.1;Password=1234;Persist Security Info=True;User ID=sa;Initial Catalog=Inspection;Data Source=QC”
strLaporan = “{tbKain.TglCheck} >= #” & CDate(dtTglAwal.Value) & “# and ” & _
“{tbKain.TglCheck} <= #" & CDate(dtTglAkhir.Value) & "#"
With rptKainMasuk
.ReportSource = crptReport
.Connect = Cont
.ReportFileName = App.Path & "\rptkainmasuk.rpt"
.SelectionFormula = strLaporan
.RetrieveDataFiles
.Action = 1
End With
please inform me where its the mistake, and how ought to, thank's