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:
Public Con As New ADODB.Connection Public Rs As New ADODB.Recordset con.open(“PROVIDER=MSDASQL;Driver=SQL Server;SERVER=;uid=abc;pwd=xyz;Database=Testingdb;”) Con.CommandTimeout = 10800
“In the form that generate the crystal report”
VB Code:
Dim m_Proj As CRAXDRT.Application Dim WithEvents m_Report As CRAXDRT.Report Dim strConnProject As String Dim sqlCurrentRiskListQuery As String Dim datcmd1 As New ADODB.Command Set m_Proj = New CRAXDRT.Application Set m_Report = m_Proj.NewReport sqlCurrentRiskListQuery = “select * from querry1 inner join…..” Set datcmd1 = New ADODB.Command Set datcmd1.ActiveConnection = Con datcmd1.CommandText = sqlCurrentRiskListQuery datcmd1.CommandType = adCmdText m_Report.Database.AddADOCommand Con, datcmd1
I'm getting the error shown in the attached picture


Reply With Quote