我试过连接sql server2000,用ado连接很方便。
5 个解决方案
#1
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;
'(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;
#2
还可以使用ODAC组件连接Oracle
#3
关注关注
#4
如果你不想安装oralce客户端,就像上面2楼告诉你的,用ODAC。
#5
关注了,学习了
#1
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;
'(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;
#2
还可以使用ODAC组件连接Oracle
#3
关注关注
#4
如果你不想安装oralce客户端,就像上面2楼告诉你的,用ODAC。
#5
关注了,学习了