环境:windows2008R2企业版64位,安装Oracle 11g 64位版服务端。C#3.5开发的b/s系统,32位版。delphi7开发的c/s服务 错误提示: Oracle 11g 64位版在64位操作系统上连接Oracle的问题和解决方案 BadImageFormatException 同时解决Delphi7.0采用Oledb链接64位o
环境:windows2008R2企业版64位,安装Oracle 11g 64位版服务端。C#3.5开发的b/s系统,32位版。delphi7开发的c/s服务
错误提示:
Oracle 11g 64位版在64位操作系统上连接Oracle的问题和解决方案 BadImageFormatException
同时解决Delphi7.0采用Oledb链接64位oracle11g出现密码不正确的问题。
尝试加载Oracle客户端库时引发BadImageFomatException。如果在安装32位Oracle客户端组件的情况下以64位模式运行,将出现此问题。
错误原因是原来WinXP机子上所安装的OracleInstantClient是32位,所以编译的程序所用的OracleClient也是32位的,从而导致兼容问题。当然,如果在64位操作系统上重新安装64位的Oracle客户端再重新编译程序也是能解决问题的。这里我们介绍一种简单的方法来移植程序。
如果在服务器端安装32位的oracle9i客户端,要注意密码的大小写的问题,9i客户端默认会把密码转换成大写,要特别注意。
总之解决问题的方法是:在服务端再安装一个Oracle 11g 32位版的客户端
参考文章:http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/10/19/system-data-oracleclient-requires-oracle-client-software-version-8-1-7.aspx
我的奮鬥-System.Data.OracleClient on Windows 2008 x64
自從家中與公司的機器分別改用Vista x64及Windows 2008 x64後,在享受爽快揮霍記憶體之餘,也一併開始體驗在新大陸拓荒的感覺。大部分的高階應用程式,多半可以x86虛擬環境執行,問題不大。但有不少涉及低階處理的程式選擇頓時劇減,例如: RamDisk因為Driver未具備簽章無法使用、能支援x64的免費防毒軟體屈指可數、之前提到重新Survey了DVD燒錄程式...
這些軟體上的短缺咬一咬牙就撐過了,最讓我痛苦的是原本部門大家慣用的ODP.NET 9207完全不支援x64版本,安裝程式根本沒法跑!
Google之後,知道Oracle 10.2g開始Support Vista/Windows 2008 x64,但無奈ORACLE網站不知怎麼,連續好幾天,下載連結都出現HTTP 404。最後終於在兩週後讓我下載到近500M的10204_vista_w2k8_x64_production_client.zip,安裝完成馬上用現有的專案試了一下,結果出現:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
檢視權限等OK,試了一下重新開機,訊息變了:
System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B).
似乎是DLL版本不對,但我明明裝的是64bit Oracle Client,.NET程式限定Build for x86 CPU,為什麼跟我說: 在64 Mode下去讀了32bit Oracle Client? 感覺上恰恰相反才對。
反覆測試,忽然發現如果設定Build for AnyCPU或x64就可以順利連上Oracle,唯獨設成x86時會出現上述疑似相反的錯誤。設成x86時去讀取64bit Oracle Client DLL會發生問題,十分合理,只是一開始的錯誤訊息讓我有些迷惑。如果這是問題,那麼是否同時再裝32bit Oracle Client就好? 但,System.Data.OracleClient要如何知道該用32bit或64bit Oracle Client? 我每次都要改Registry或設PATH環境變數來切換使用的Client嗎? 一切的疑問,都要試了才知道!!
找到10203_vista_w2k8_x86_production_client.zip,裝在另一個目錄下(c:\oracle\ora10g vs c:\oracle\ora10g_x86),重新登入讓PATH環境變數中的c:\oracle\oar10g_x86\bin生效,x86就可以跑了。抱著期待的心情切成x64再跑,Yes! 也成功了!! 但這是x64 .NET用32bit Oracle Client的結果嗎?
使用Process Monitor解開了疑惑: System.Data.OracleClient會沿著PATH環境變數的路徑去找oci.dll,在x64下會略過c:\oracle\ora10g_x86\bin\oci.dll,找到c:\oracle\ora10g\bin\oci.dll後連線;x86時則是找到c:\oracle\ora10g_x86\bin\oci.dll就結束尋找,AnyCPU則與x64的行為相同。
(記得之前的PB6連Oracle9嗎? 一樣是用PATH法)
換句話說,OracleClient會依x64/x86決定適當的Oracle Client版本,不必勞煩我去手工切換。因此,如果想在Windows 2008/Vista x64上使用System.Data.Oraclient,最好32bit/64bit兩種10.2+版本的Oracle Client都要裝,並確定PATH變數中二者的bin目錄都有在其中,一切就搞定了。
說來簡單,卻花了我好幾個星期才解決,希望這點心得對其他也在x64叢林中挺進的同胞們有些幫助。

三大操作系统:1、windows,是微软公司以图形用户界面为基础研发的操作系统,主要运用于计算机、智能手机等设备。2、macOS,是一套由苹果开发的运行于Macintosh系列电脑上的操作系统,是基于XNU混合内核的图形化操作系统。3、linux,是一种免费使用和自由传播的类UNIX操作系统,是一个基于POSIX的多用户、多任务、支持多线程和多CPU的操作系统。

vivo手机是“Funtouch OS”和“OriginOS”系统;2020年11月18日之前,vivo手机搭载的都是“Funtouch OS”系统,2020年11月18日“OriginOS”操作系统发布之后,vivo手机搭载的就是“OriginOS”操作系统了,首款搭载该系统的是“vivo X60”系列手机。

闭环控制系统是控制系统的一种类型,能够把系统输出量的一部分或全部通过一定方法和装置反送回系统的输出端,再将反馈信息与原输入信息进行比较,将比较的结果施加于系统进行控制,避免系统偏离预定目标。

操作系统是管理计算机硬件与软件资源的计算机程序,是控制和管理计算机软硬件资源,以尽量合理有效的方法组织多个用户共享多种资源的程序集合。操作系统的作用:1、管理系统中的各种资源;2、为用户提供良好的界面。从计算机用户的角度来说,操作系统体现为其提供的各项服务;从程序员的角度来说,其主要是指用户登录的界面或者接口;从设计人员的角度来说,就是指各式各样模块和单元之间的联系。

系统软件中最重要的软件是“操作系统”。在计算机中,操作系统是其最基本也是最为重要的基础性系统软件;操作系统需要处理如管理与配置内存、决定系统资源供需的优先次序、控制输入设备与输出设备、操作网络与管理文件系统等基本事务。

影响电脑开机快慢的因素:1、操作系统;如果操作系统太过庞大,开机要加载的文件、服务、软件过多就会让开机速度变慢。2、硬件;硬件对于开机的影响主要是CPU、内存容量和硬盘速度,主板中预存的引导程序会引导CPU通过主板从硬盘中调用启动系统的数据,然后在内存空间内运行,因而CPU、内存大小和硬盘直接影响电脑开机的速度。3、加载项;加载项越多,硬盘要加载的东西就越多,开机速度就越慢。

windows boot manager无法进入系统的解决办法:1、开机按DEL键;2、进BIOS设置光盘或U盘引导电脑进WinPE;3、使用Diskgenius重建主引导记录,并重启电脑;4、重装操作系统。

miui是小米公司旗下基于Android系统深度优化、定制、开发的第三方手机操作系统。MIUI在Android系统基础上,针对中国用户进行了深度定制,专为小米智能手机设计,包含红米系列,同时支持手机物联。在隐私方面,miui系统会记录各应用的一切敏感行为,并呈现出来;当应用使用相机、录音、定位权限时,系统会给出明显提示,点击提示即可进行管控。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
