Connecting to Oracle using connect string 
Author Message
 Connecting to Oracle using connect string

I am using the following code in Visual Basic 5.0 to connect to an
Oracle Database

    CrystalReport1.ReportFileName = "am19mod.rpt"
    CrystalReport1.Connect = "DSN=" & txtDSN & ";UID=" & txtUID &
";PWD=" & txtPWD & ";SERVERNAME=" & txtDBQ
    CrystalReport1.Action = 1

and get error:

        Number:         20536
        Description:    Unable to connect: incorrect log on parameters.

if the "Server Name" field in the Data Source configuration (in ODBC in
Control Panel) is left blank.
If I enter the Oracle database name in this field it works. We can not
use that because we need to change database dynamically from the
I have tried to replace "SERVERNAME=" with "DBS=", "DBQ=", "DSQ=" and
"DATABASE=" with the same disappointing result.

Is there any solution or workaround?

I am using CRYSTL32.OCX version and Intersolv ODBC 3.01 for

Mon, 17 Jul 2000 03:00:00 GMT  
 Connecting to Oracle using connect string

Hi Lars,

I've never had to use the ServerName or DSQ.  Try setting the DSN to the
Datasource, PWD and UID.  This should be all that matters.  If you need
to see what to use, open the report in Crystal and go to Database | Set
Location.  You will see in the Location ssection the ServerName which
will be your DSN, UserId.  Database will be blank, this is equivalent to
the DSQ.  Just add the password.

Brian Dong

Please remove nospam from the address to reply.

Mon, 17 Jul 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Unable to connect Oracle using the Microsoft OLE DB Provider for Oracle

2. Connecting to Oracle thru Oracle OLE DB Provider(OraOLDDB.Oracle)

3. looking for example of Oracle's connective string for connecting to ASP

4. ADO OLE DB Oracle connect string

5. ADO OLE DB Oracle connect string

6. oracle odbc connect string through code

7. connect string with oracle

8. How to connect to an Oracle database using Access

9. How to connect to Oracle using ORADC in VB 6

10. How to connect to ORACLE other than using ODBC

11. Problem connecting to Oracle Database using ODBC

12. VB connected to Oracle using Orbix as middleware


Powered by phpBB® Forum Software