【问题标题】:odbcException was unhandledodbcException 未处理
【发布时间】:2016-08-02 12:03:41
【问题描述】:

ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.45-community-nt]您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的“from petugas where nama='ANTON', and kode_petugas='ADM01'' 附近使用正确的语法

如何解决它的问题。

【问题讨论】:

  • 您的查询语法不正确。请edit该问题添加相关详细信息,例如查询本身。由于缺乏背景而投票结束。

标签: mysql vb.net xampp config


【解决方案1】:

我认为您使用了, 或行尾ADM01 而不是ADM01,这就是错误。

使用以下查询,

from petugas where nama='ANTON' and kode_petugas='ADM01'

【讨论】:

  • 如果我更改上面相同的代码将在代码上出错...错误 [42000] [MySQL][ODBC 5.1 驱动程序][mysqld-5.0.45-community-nt]你有一个SQL 语法错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行的 'from petugas where nama=' & TextBox1.Text & ', and kode_petugas=' & MenuUtama.Pa' 附近使用正确的语法
  • 来自 petugas where nama=' " & TextBox1.Text & ' ", and kode_petugas=' "& MenuUtama.Pa & " ' "
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-11-19
  • 2017-11-16
  • 1970-01-01
  • 2019-11-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多