odac 连接方法

OraSession1.Server:='172.40.100.88:1521:shopfloor';
      OraSession1.Username:=用戶名;
      OraSession1.Password:=密碼;
      OraSession1.Options.Direct:=True;
      OraSession1.Options.Net:=true;
      OraSession1.connectprompt:=false;
       OraSession1.Connected:=true;
/////////////////////////////////////////////////////
 if not OraSession1.Connected then
  begin
  try
  OraSession1.ConnectString := '218.206.107.11:1521:RjTest;
  OraSession1.Options.Direct := True;
  OraSession1.Options.Net := True;
  OraSession1.Open;
  except on E: Exception do
  ...
  end;
  end;
/////////////////////////////////////////////////////
原文地址:https://www.cnblogs.com/hssbsw/p/2300861.html