Вопрос

I want to do oracle connection with C# but I want it without oracle client. Is that possible?

Это было полезно?

Решение

Yes. The oracle JDBC "THIN" client is a standalone pure java client so you don't need to install any native Oracle client (SQL*NET etc). Check http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html for Oracle 11, you want the ojdbc5.jar or ojdbc6.jar depending on if you're using Java5 or Java6.

If you are using another version of oracle, just google for instance "oracle 10g jdbc thin" for the Oracle 10 drivers (first hit when I search).

Другие советы

you need to have only the driver (jar). here is example:

Class.forName ("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//myserver:PORT/SID", "USER", "PASS");
connection = DriverManager.getConnection(url, username, password);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top