1 用Oracle 盘手工安装一个好的环境,在安装选项时选择Windows Interface (印象中是这两个字),安装完成后,把安装路径下的文件打包到你的程序中.这样在发布你的程序时,需要以把这些Oracle文件一起复制到某个路径下.2 修改注册表Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE]"inst_loc"="C://Program Files//Oracle//Inventory""ORACLE_HOME"="D://oracle//ora92""ORACLE_HOME_NAME"="OraHome92""API"="D://oracle//ora92//dbs""ORACLE_GROUP_NAME"="Oracle - OraHome92""NLS_LANG"="NA""OLEDB"="D://oracle//ora92//oledb//mesg""OO4O"="D://oracle//ora92//oo4o//mesg"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/ALL_HOMES]"HOME_COUNTER"="1""DEFAULT_HOME"="OraHome92""LAST_HOME"="0"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/ALL_HOMES/ID0]"NAME"="OraHome92""PATH"="D://oracle//ora92""NLS_LANG"="NA"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0]"ID"="0""ORACLE_GROUP_NAME"="Oracle - OraHome92""ORACLE_HOME_NAME"="OraHome92""ORACLE_HOME"="D://oracle//ora92""ORACLE_BUNDLE_NAME"="Enterprise""NLS_LANG"="SIMPLIFIED CHINESE_CHINA.ZHS16GBK""ORAMTS_CP_TRACE_LEVEL"="0""ORAMTS_CP_TRACE_DIR"="D://oracle//ora92//oramts//Trace""ORAMTS_CONN_POOL_TIMEOUT"="120""ORAMTS_SESS_TXNTIMETOLIVE"="120""ORAMTS_NET_CACHE_MAXFREE"="5""ORAMTS_NET_CACHE_TIMEOUT"="120000""ORAMTS_OSCREDS_MATCH_LEVEL"="OS_AUTH_LOGIN"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OLEDB]"CacheType"="Memory""ChunkSize"="100""DistribTX"="1""FetchSize"="100""OSAuthent"="0""PLSQLRSet"="0""PwdChgDlg"="1""SchRstLng"="10000""UserDefFn"="0""DisableRetClause"="1""VCharNull"="1""TraceCategory"="0""TraceFileName"="c://OraOLEDB.trc""TraceLevel"="0""TraceOption"="0"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OO4O]"CacheBlocks"="20""FetchLimit"="100""FetchSize"="4096""HelpFile"="D://oracle//ora92//MSHELP//oracleo.hlp""PerBlock"="16""SliceSize"="256""TempFileDirectory"="c://temp""OO4O_HOME"="D://oracle//ora92//oo4o"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService][HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService/Protid_0]"Name"="HTTP""Host"="192.168.9.12""Port"="2030"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService/Setup]"NumberOfInstalls"=dword:00000001[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService/Setup/All Versions][HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService/Setup/All Versions/1]"Version"="9.2.0.0.0""Home"="Software//ORACLE//HOME0"[HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/OracleMTSRecoveryService/Setup/Current Version]"Version"="9.2.0.0.0""Home"="Software//ORACLE//HOME0"[HKEY_CLASSES_ROOT/OraOLEDB.Oracle]@="Oracle Provider for OLE DB"[HKEY_CLASSES_ROOT/OraOLEDB.Oracle/CLSID]@="{3F63C36E-51A3-11D2-BB7D-00C04FA30080}"[HKEY_CLASSES_ROOT/OraOLEDB.Oracle/CurVer]@="OraOLEDB.Oracle.1"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}]@="OraOLEDB.Oracle""OLEDB_SERVICES"=dword:ffffffff[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/ExtendedErrors]@="Extended Error Lookup Service"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/ExtendedErrors/{3FC8E6E4-53FF-11D2-BB7D-00C04FA30080}]@="Oracle OLE DB Error Lookup"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/InprocServer32]@="D://oracle//ora92//bin//OraOLEDB.DLL""ThreadingModel"="Both"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/OLE DB Provider]@="Oracle Provider for OLE DB"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/ProgID]@="OraOLEDB.Oracle.1"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/TypeLib]@="{0BB9AFD1-51A1-11D2-BB7D-00C04FA30080}"[HKEY_CLASSES_ROOT/CLSID/{3F63C36E-51A3-11D2-BB7D-00C04FA30080}/VersionIndependentProgID]@="OraOLEDB.Oracle"[HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Explorer Bars/{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}/FilesNamedMRU]"000"="oraoledbpus"你可以用一个exe 程序把上面的路径替换为你客户端发布的Oracle文件路径.上面的程序在Oracle 9测试过.(手工操作是:我的电脑->高级->环境变量->Path)3 再调用windows Api把oracle文件的路径写入系统环境变量或程序环境变量Path这样你就可以像sql server 一样调用Oracle 驱动了,如果发现不行,重启电脑一下.