Results 1 to 3 of 3

Thread: ADO Error

  1. #1

    Thread Starter
    Addicted Member waelr's Avatar
    Join Date
    Nov 2004
    Posts
    168

    ADO Error

    I’m using vb6.0 to generate report using crystal report XI developer’s tool retrieving data from sql 2000 using ADO connection string

    ‘’in the main module”
    VB Code:
    1. Public Con As New ADODB.Connection
    2. Public Rs As New ADODB.Recordset
    3.  
    4. con.open(“PROVIDER=MSDASQL;Driver=SQL Server;SERVER=;uid=abc;pwd=xyz;Database=Testingdb;”)
    5.  
    6. Con.CommandTimeout = 10800

    “In the form that generate the crystal report”

    VB Code:
    1. Dim m_Proj As CRAXDRT.Application
    2. Dim WithEvents m_Report As CRAXDRT.Report
    3. Dim strConnProject As String
    4. Dim sqlCurrentRiskListQuery As String
    5. Dim datcmd1 As New ADODB.Command
    6.    
    7. Set m_Proj = New CRAXDRT.Application
    8. Set m_Report = m_Proj.NewReport
    9. sqlCurrentRiskListQuery = “select * from querry1 inner join…..”
    10. Set datcmd1 = New ADODB.Command
    11. Set datcmd1.ActiveConnection = Con
    12. datcmd1.CommandText = sqlCurrentRiskListQuery
    13. datcmd1.CommandType = adCmdText
    14. m_Report.Database.AddADOCommand Con, datcmd1

    I'm getting the error shown in the attached picture
    Attached Images Attached Images  

  2. #2
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: ADO Error

    Why don't you just use the select expert inside of crystal?

  3. #3

    Thread Starter
    Addicted Member waelr's Avatar
    Join Date
    Nov 2004
    Posts
    168

    Re: ADO Error

    please help....

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