I hv written a code for creating a report at runtime in oracle and VB6.0 using the following code. The same works in CR8.5 properly but gives the above error in CR9.0 at the AddADOCommand statement "reporttest.Database.AddADOCommand cnAdoAdm, datcmd1".
==
Set reporttest = New CrystalReport1
Set cnadm = New ADODB.Connection
cnadm.ConnectionString = "Provider=MSDAORA.1; User ID=" & vAdmin & ";Password=" & admpwd & "; Data Source=" & vDB & " ;Persist Security Info=False"
cnadm.Open
Set cnAdoAdm = New ADODB.Connection
cnAdoAdm.ConnectionString = "Provider =MSDAORA.1; User ID=" & vAdmin & "/" & admpwd & "@" & vDB & " ;Persist Security Info=False"
' cnAdoAdm.ConnectionString = "Provider=MSDAORA.1; User ID=" & vAdmin & ";Password=" & admpwd & "; Data Source=" & vDB & " ;Persist Security Info=False"
cnAdoAdm.Open
Set datcmd1 = New ADODB.Command
Set datcmd1.ActiveConnection = cnAdoAdm
datcmd1.CommandText = "select * from " & Trim(vAdmin) & ".tbl_temp_register order by ourref"
datcmd1.CommandType = adCmdText
Set rstest = New ADODB.Recordset
rstest.CursorLocation = adUseClient
rstest.CursorType = adOpenKeyset
rstest.LockType = adLockOptimistic
rstest.Source = "select * from " & Trim(vAdmin) & ".tbl_temp_register order by ourref"
rstest.Open rstest.Source, cnadm, , , adCmdText
reporttest.Database.LogOnServer "crdb_oracle.dll", vDB, "", Trim(vAdmin), Trim(admpwd)
reporttest.Database.AddADOCommand cnAdoAdm, datcmd1
reporttest.Database.Tables(1).SetLogOnInfo Trim(vAdmin) & "/" & Trim(admpwd) & "@" & vDB
==
very urgent ...PLEASE HELP.
==
Set reporttest = New CrystalReport1
Set cnadm = New ADODB.Connection
cnadm.ConnectionString = "Provider=MSDAORA.1; User ID=" & vAdmin & ";Password=" & admpwd & "; Data Source=" & vDB & " ;Persist Security Info=False"
cnadm.Open
Set cnAdoAdm = New ADODB.Connection
cnAdoAdm.ConnectionString = "Provider =MSDAORA.1; User ID=" & vAdmin & "/" & admpwd & "@" & vDB & " ;Persist Security Info=False"
' cnAdoAdm.ConnectionString = "Provider=MSDAORA.1; User ID=" & vAdmin & ";Password=" & admpwd & "; Data Source=" & vDB & " ;Persist Security Info=False"
cnAdoAdm.Open
Set datcmd1 = New ADODB.Command
Set datcmd1.ActiveConnection = cnAdoAdm
datcmd1.CommandText = "select * from " & Trim(vAdmin) & ".tbl_temp_register order by ourref"
datcmd1.CommandType = adCmdText
Set rstest = New ADODB.Recordset
rstest.CursorLocation = adUseClient
rstest.CursorType = adOpenKeyset
rstest.LockType = adLockOptimistic
rstest.Source = "select * from " & Trim(vAdmin) & ".tbl_temp_register order by ourref"
rstest.Open rstest.Source, cnadm, , , adCmdText
reporttest.Database.LogOnServer "crdb_oracle.dll", vDB, "", Trim(vAdmin), Trim(admpwd)
reporttest.Database.AddADOCommand cnAdoAdm, datcmd1
reporttest.Database.Tables(1).SetLogOnInfo Trim(vAdmin) & "/" & Trim(admpwd) & "@" & vDB
==
very urgent ...PLEASE HELP.