使用ADO套接字连接:

conn:= '(DESCRIPTION = '+
'(ADDRESS_LIST = '+
'(ADDRESS = (PROTOCOL = TCP)(HOST = '+host+')(PORT = '+port+')) '+
' ) '+
'(CONNECT_DATA = '+
' (SERVICE_NAME = '+sid+')'+
' ) '+
' )';
GDB:=TCPADOCONNECTION.Create(nil);
GDB.ConnectionString:='Provider=OraOLEDB.Oracle.1;Password='''+psw+''';Persist Security Info=True;User ID='''+user+''';Data Source='+conn;
GDB.Connected:=true;

http://www.doc88.com/p-8018027133711.html

请参阅此文。

05-23 05:55