PDA

Click to See Complete Forum and Search --> : ADO Error


waelr
Feb 12th, 2007, 10:42 AM
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”
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”

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

Besoup
Feb 12th, 2007, 01:20 PM
Why don't you just use the select expert inside of crystal?

waelr
Feb 19th, 2007, 03:39 AM
please help....