mysql - 如何解决 VB.net 中的此类错误?MySql.Data.MySqlClient.MySqlException: '你的 Sql 语法有错误;看说明书……”
问题描述
Private connection As New MySqlConnection("datasource=localhost;port=3306;username=root;password=;database=hotelmanagementdb")
ReadOnly Property getConnection() As MySqlConnection
Get
Return connection
End Get
End Property
Sub openConnection()
If connection.State = ConnectionState.Closed Then
connection.Open()
End If
End Sub
Sub closeConnection()
If connection.State = ConnectionState.Open Then
connection.Close()
End If
End Sub
adapter.Fill(table) 处
的错误引发错误以检查与您的 MariaDB 服务器版本相对应的手册,以便password
在第 1 行的“=”附近使用正确的语法
我一直在 Xampp 中更新我的 MySql 端口,原因是错误,我想这就是发生一些错误的原因
解决方案
关于mysql密码,请不要输入密码。
如果你的mysql没有密码请设置, Password='';
推荐阅读
- solr - 在 Hybris 中过滤 Solr 自动建议
- python - 使用 python 创建模型时处理 NAN 值
- excel - VBA 搜索值并从列表中删除(for 循环太慢)
- quill - Quill 自定义印迹:如何使 Quill 接受“传入”自定义代码
- node.js - Terser 丑化了 Node.js 环境中的 process.env,使其无法使用
- rest - 在rest api body中定义“外键”元素时的命名约定
- java - 字符串索引超出范围:0 在 Spring Boot 中使用 RedirectAttributes 时出错
- formatting - 更改 PyCharm 中 Black 插件的 88 个字符限制
- javascript - 在动态创建的 AJAX 元素上使用 $(window) 进行事件绑定
- http - HTTP Chrome 请求中的 CRLF