Results 1 to 5 of 5

Thread: Cannot Open SQL Server

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking 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

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    can i please have your code that you are using to connect to the database to fill your report with data?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707
    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

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    are you having a problem connecting to your database via a crystal report? or via ADO for a recordset?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707
    Via crystal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width