几个方案,
一是,通过ODBC连,先建DSN数据源,在DELPHI中用ADO调用就行,只要在装好ORACLE就行,
二是,非DSN的方法,DELPHI我没用过,现在有个JAVA的例子
odbc:
// Load the Oracle JDBC driver
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
// Connect to the database
// You can put a database name after the @ sign in the connection URL.
Connection conn =
DriverManager.getConnection ("jdbc
dbc:test", "yang", "yang");
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select * from test");
// Iterate through the result and print the employee names
rset.next ();
jdbc,not dsn
// Load the Oracle JDBC driver
Class.forName ("oracle.jdbc.driver.OracleDriver");
// Connect to the database
// You can put a database name after the @ sign in the connection URL.
Connection conn =
DriverManager.getConnection ("jdbc
racle:thin
webstation_tk:1521
ra8", "yang", "yang");
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select * from test");
// Iterate through the result and print the employee names
rset.next ();