MySQL ODBC 5.1 Set Names not allowed by driver(MySQL ODBC 5.1 驱动程序不允许设置名称)
问题描述
我有一个 windows 2008 服务器和一个 asp 网站.
I've a windows 2008 server and an asp website.
我将站点从 Windows 2003 服务器移至我的服务器,它运行良好.它使用 mysql 作为数据库,Set Names 'Latin5' 是 odbc 驱动程序的初始语句.
I moved site to my server from a windows 2003 server and it was working good. It uses mysql as database and Set Names 'Latin5' was it's odbc driver initial statement.
我尝试设置相同的初始语句,但收到驱动程序不允许设置名称"错误消息,并且 db update/insert 查询出错.
I tried to set same initial statement and I got "Set Names not allowed by driver" error message and db update/insert queries gives error.
该网站使用土耳其语.
感谢您的帮助..
推荐答案
SET NAMES 已在 MyODBC 版本 5.1 中删除.http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-news-5-1-1.html
SET NAMES has been removed in MyODBC version 5.1. http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-news-5-1-1.html
所以你有几个选择:
使用 MyODBC 5.1,删除所有 SET NAMES 调用.
With MyODBC 5.1, remove all of the SET NAMES calls.
在 ODBC 中更改您的 DSN 以指定字符集,否则如果您使用的是无 DSN 连接字符串,则需要添加 Charset=Latin5;
Change your DSN in ODBC to specify a character set, otherwise if you are using a DSN-less connection string, you will need to add Charset=Latin5;
示例:
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Charset=Latin5;
您可能还需要分隔表名,MySQL 使用 ` 来分隔表名.
You may also need to delimit your table names, MySQL uses ` to delimit table names.
示例:
SELECT id FROM `table`;
最后一个选择是降级到 MyODBC 3.51.
Last option is to downgrade to MyODBC 3.51.
这篇关于MySQL ODBC 5.1 驱动程序不允许设置名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL ODBC 5.1 驱动程序不允许设置名称
基础教程推荐
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- oracle区分大小写的原因? 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 在多列上分布任意行 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
