Forum Stats

  • 3,815,605 Users
  • 2,259,059 Discussions
  • 7,893,185 Comments

Discussions

oledb connection string for 11g XE

900859
900859 Member Posts: 3
edited Nov 17, 2011 6:08PM in Oracle Provider for OLE DB
I installed Oracle 11g XE and ODAC package and am trying to use C# OLEDB to create a database connection, however it does not work, i tried following connection strings, none of them worked:

(1) connectionString = "Provider=OraOLEDB.Oracle;Data Source=localhost:8080/apex/my_database_name;User ID=system;Password=xxxxx;"

(2) connectionString = "Provider=OraOLEDB.Oracle;Data Source=localhost:8080/apex/;User ID=system;Password=xxxxx;"

I can log into application express via http://127.0.0.1:8080/apex/f?p=4500:1000:7710556667646572 to create and modify tables without any problem.

Any ideas?

Thanks!

Answers

  • orafad
    orafad Member Posts: 8,035 Silver Trophy
    The web gateway listens on port 8080 - for database connections the default port is 1521. (Find actual port number via lsnrctl status command.)

    Also, service name is xe, which means the easy connect string would look more like: localhost:1521/xe instead of the ones listed above.
  • 900859
    900859 Member Posts: 3
    Thanks, "localhost:1521/xe" works fine for me.

    I can create connection and get all table metadata list including system table information which I am not interested in, is there any way to specify database name in connection string to narrow down table list? I log into http://localhost:8080/apex/f?p=4500:3002:2546245833875081::NO:::, the system asks me to enter info for Workspace, Username and password, after I log in, I can only see tables which I am interested in.
This discussion has been closed.