如何将mysql数据库连接到实时服务器?

问题描述:

编译错误

描述:在编译服务此请求所需的资源期间发生错误。请查看以下具体错误详细信息并正确修改源代码。



编译器错误消息:BC30002:未定义类型MySqlConnection。



来源错误:





第17行:Dim Conns As String = ConfigurationManager.ConnectionStrings( DBCS)。ConnectionString

第18行:'[DBCS] .ConnectionString

第19行:Dim MySqlConnection As MySqlConnection = New MySqlConnection(Conns)

第20行:'

第21行:将SQLquery变为字符串





源文件:C :\ Inetpub \vhosts\imshcb.com.ng\httpdocs\indexes\registeredReports.aspx.vb行:19



我需要帮助。

谢谢



我的尝试:



我试过更改我的连接字符串但它没有用

我也更改了数据库虽然托管设置但无济于事。

然后我恢复默认设置。请,我需要帮助。



谢谢

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'MySqlConnection' is not defined.

Source Error:


Line 17: Dim Conns As String = ConfigurationManager.ConnectionStrings("DBCS").ConnectionString
Line 18: '["DBCS"].ConnectionString
Line 19: Dim MySqlConnection As MySqlConnection = New MySqlConnection(Conns)
Line 20: '
Line 21: Dim SQLquery As String


Source File: C:\Inetpub\vhosts\imshcb.com.ng\httpdocs\indexes\registeredReports.aspx.vb Line: 19

Please I need help.
Thanks

What I have tried:

I have tried changing my connection string but it did not work
I also changed the database hosting settings but to no avail.
I then returned to default settings. Please, I NEED HELP.

THANKS

你需要为MySql引用DLL,阅读以下内容:

如何为.NET的MySQL连接器添加引用? - 堆栈溢出 [ ^ ]

使用VB.NET连接到MySQL - VB.NET教程| Dream.In.Code [ ^ ]

使用MySQLConnector在ASP.Net应用程序中使用并连接MySQL数据库 [ ^ ]
You need to reference the DLL for MySql, read the following :
How do I add a reference to the MySQL connector for .NET? - Stack Overflow[^]
Use VB.NET To Connect To MySQL - VB.NET Tutorials | Dream.In.Code[^]
Use and connect to MySQL Database in ASP.Net Application using MySQLConnector[^]