
VB5 Crystal Report to Oracle 7.2.1.1.2 connection problem
Hi there,
On connection to my Oracle database via ODBC the
Crystal Reports oracle driver INTERSOLVE reports that i am unlicesed
to use their product. Crystal informs me that this is definately not the
case
but still have not replied with a solution.
The code following is a snippet to make the connection and bind a data
control to my report. If you see anything obvious or perhaps have used
a different method successfully PLEASE reply.
It happens just as the OpenConnection is executed
Private bConnected As Boolean
Private connectiondb As Connection
Private wrkODBC As Workspace
Private strConnect As String
Private strSQL As String
Private qdf As QueryDef
Private Sub Command1_Click()
On Error GoTo ErrorHandler
OpenIt
ErrorHandler:
Msg = "Unexpected error #" & Str(Err.Number)
Msg = Msg & " occurred: " & Err.Description
MsgBox Msg, vbCritical
Exit Sub
End Sub
Private Sub OpenIt()
strConnect = "ODBC;DATABASE=cdsSun" + _
";UID=system" + _
";PWD=manager" + _
";DSN=cdsSun"
'Create ODBCDirect Workspace object.
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", _
"admin", _
"", _
dbUseODBC)
Set connectiondb = wrkODBC.OpenConnection("cdsSun", _
dbDriverNoPrompt, , _
"ODBC;DATABASE=cdsSun;UID=system;PWD=manager;DSN=cdsSun")
Set qdf = connectiondb.CreateQueryDef("")
With qdf
.SQL = "select table_name from all_tables"
Set Data1.Recordset = .OpenRecordset(dbOpenDynaset)
End With
qdf.Close
connectiondb.Close
wrkODBC.Close
End Sub