-
Cannot Open SQL Server
I hava this sentence
With Reporte
.ReportFileName = strRuta(3) & "Ganadores.rpt"
.Action = 0
End With
a) I use crystal and i can see data on the report
b) The Table has data
c) In my APP i open the server, the database and work with tables (specially with the one that the report use), see data, modify,etc.
d) Why, why when i run the sentece above i got the following error: CANNOT OPEN SQL SERVER
-
can i please have your code that you are using to connect to the database to fill your report with data?
-
Private Sub LeerInicio()
strRuta(3) = LeerIni("Path", "Reports", App.Path "\concurso.ini")
txtservidor = LeerIni("DataBase", "Server", App.Path "\concurso.ini")
txtdb = LeerIni("DataBase", "DB", App.Path & "\concurso.ini")
End Sub
Private Sub Conexion1()
Call LeerInicio
sqlstring = "Provider= SQLOLEDB;" _
& "Data Source=" & txtservidor & ";" _
& "Initial Catalog= " & txtdb & ";" _
& "UID=concurso;" _
& "PWD=concurso;" _
& "Connect Timeout=35;"
Set cnCaribe = New ADODB.Connection
cnCaribe.Open sqlstring
cnCaribe.Execute "SET QUOTED_IDENTIFIER ON"
End Sub
-
are you having a problem connecting to your database via a crystal report? or via ADO for a recordset?
-