search
HomeDatabaseMysql Tutorial连接MySQL 提示错误"未能加载文件或程序集“MySql.Data, Ve

CodeSmith4.1.3版本连接MySQL 提示错误未能加载文件或程序集“MySql.Data, Version=5.1.4.0, Culture=neutral,........”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 解决方法: 下载MySQL.Data.dll(5.1.4)程序集 ,地址是ftp.ntu.edu.tw

CodeSmith4.1.3版本连接MySQL 提示错误"未能加载文件或程序集“MySql.Data, Version=5.1.4.0, Culture=neutral,........”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。"

解决方法:
下载MySQL.Data.dll(5.1.4)程序集 ,地址是 ftp.ntu.edu.tw/pub/MySQL/Downloads/Connector-Net/mysql-connector-net-5.1.4-noinstall.zip

将MySQL.Data.dll放在CodeSmith目录中Bin目录下,重新运行,问题解决!

注意:下载MySQL.Data.dll版本必须和的连接错误提示中的版本号对应,下载地址"5.1.4"改为你所需版本号即可

 

 

 提示"未能加载文件或程序集“MySql.Data, Version=5.0.7.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自HRESULT:0x80131040)" 

  把MySQL.Data.dll,复制到CodeSmith下的Bin目录,再调用还是错误,百思不得其解, 

  后来看MySQL.Data.dll文件版本是5.2.1.0,比错误提示的大,看来要下一个5.0.7.0的试试, 

  下载地址是 http://ftp.ntu.edu.tw/pub/MySQL/Downloads/Connecto r-Net/mysql-connector-net-5.0.7-noinstall.zip , 

  将其中的MySQL.Data.Dll文件重新复制到CodeSmith下的Bin目录,再配置测试,OK了. 

  看来CodeSmith将数据库程序调用写死了,应该设置成配置文件,让用户自己定义版本,这样才更灵活. 

 

 

 

http://www.cnblogs.com/68681395/archive/2010/09/26/1835971.html

未能加载文件或程序集“Oracle.DataAccess, Version=2.111.7.0, Culture=neutral, PublicKeyToken=89b483f429c47342”或它的某一个依赖项。试图加载格式不正确的程序


对于64位的操作系统:Oracle.DataAccess.dll iis的应用程序池的高级选项
连接MySQL 提示错误"未能加载文件或程序集“MySql.Data, Ve 

 

这里要设置为true,上面的是32位的数据库,上次的出错,就是这个解决。但是当数据库为64位的时候:Oracle.DataAccess.dll,要换成当前数据库的这个文件,同时把那个地方设置为false



连接MySQL 提示错误"未能加载文件或程序集“MySql.Data, Ve最近在做ASP.Net开发中使用Oracle,其中用到了Oracle提供的数据库提供程序ODP.NET,具体用到了Oracle.DataAccess.dll这个组件。在实践中,碰到过几次都出现“未能加载文件或程序集”Oracle.DataAccess, Version=2.112.1.0 …””,如上图所示。在此,问题和解决方法总结如下:

1. 问题出现的可能原因

(1)引用出错:无法加载时,可能是Oracle.DataAccess.dll引用的路径不正确;

(2)版本不匹配:在开发中引用的Oracle.DataAccess.dll与Oracle中的版本不匹配。所谓版本不匹配,一方面是指版本号不匹配;另一方面是64位和32位不匹配,使用64位的Oracle时一定要使用相应64位的Oracle.DataAccess.dll。

2. 解决办法

(1)检查引用是否出错时很简单,就看引用路径中是否存在Oracle.DataAccess.dll这个文件;

(2)Oracle.DataAccess.dll 一般位于Oracle安装目录 “../product/11.2.0/dbhome_1/ODP.NET/bin/2.x/”中,在开发时使用与程序中连接Oracle对应的Dll即可。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

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