gpt4 book ai didi

c# - 将 Windows 应用商店应用程序连接到本地主机

转载 作者:行者123 更新时间:2023-11-30 22:58:41 25 4
gpt4 key购买 nike

我正在尝试将我的 Windows 应用商店应用程序连接到本地主机上托管的 mysql 数据库。数据连接成功,但我无法解析 Mysqlconnection 函数。我试图添加 mysql.data 引用,但它没有出现在选项中。我尝试添加 MySql.Data.MySqlClient 命名空间,但没有解决。我已经安装了 mysql visual studio 插件 1.1.1。

最佳答案

您最好使用WCFWeb Service 来连接您的数据库。然后让您的 Windows 应用商店应用程序引用 WCF 或 Web 服务

因为您的应用将发布并安装给许多客户端。不建议直接连接客户端和数据库。

如果你只是想在你的本地机器上测试。这里有一些关于此的文章:

MySQL for Windows Store apps

How to: Using MySQL Connector/NET with Windows Store Apps

关于c# - 将 Windows 应用商店应用程序连接到本地主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25054494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com