🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.comp.database.mysql
Article #17

���һ��Mysql�����⡣

#17
From: xiaotiger666
Date: Mon, 27 Nov 2006 07:19
56 lines
3902 bytes
��Һã�
            ���õ���MySql 5.1�İ汾������VCд��һ��ADO������������MySql�������ڲ������ĵ�ʱ�����DZ��?
��������ǣ�
       1064 You have an error in your SQL syntax;
       check the manual that corresponds to your MySQL server version for 
the right syntax to use near '' at line 1

       ��д�IJ��������� Insert into 
T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin','������','������');
       ����һ���Ӣ�ľ���ִ�гɹ���Insert into 
T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin','aaa','aaa');

       ���ʴ������ʲôԭ���ַ�Ҳ����İ� �Ұ�����Ϊ��
      Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) 
values('admin',_gbk'������',_gbk'������');
Ҳ���С�

      ����һ�£������������ִ�������䶼��û������ģ������һ��ܲ�ѯ������ 

mysql> show variables like '%char%';
+--------------------------+--------------------------+
| Variable_name            | Value                    |
+--------------------------+--------------------------+
| character_set_client     | gbk                      |
| character_set_connection | gbk                      |
| character_set_database   | gbk                      |
| character_set_filesystem | binary                   |
| character_set_results    | gbk                      |
| character_set_server     | gbk                      |
| character_set_system     | utf8                     |
| character_sets_dir       | D:\MySql\share\charsets\ |
+--------------------------+--------------------------+
8 rows in set (0.00 sec)
mysql> Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) 
values('admin',_gb
k'������',_gbk'������');
Query OK, 1 row affected (0.05 sec)
mysql> select * from T_addressGroup;
+------+---------+-------------+--------+
| F_Id | F_Owner | F_GroupName | F_Desc |
+------+---------+-------------+--------+
|    1 | admin   | ������      | ������ |
+------+---------+-------------+--------+
1 row in set (0.00 sec)
mysql> Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) 
values('admin','��
����','������');
Query OK, 1 row affected (0.05 sec)
mysql> select * from T_addressGroup;
+------+---------+-------------+--------+
| F_Id | F_Owner | F_GroupName | F_Desc |
+------+---------+-------------+--------+
|    1 | admin   | ������      | ������ |
|    2 | admin   | ������      | ������ |
+------+---------+-------------+--------+
2 rows in set (0.00 sec) 
Technical Details
Message-ID: <eke3ir$m6u$1@news.yaako.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.cn99.com!news.yaako.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114450,6d208fa0adb87342,start
X-Google-Attributes: gid114450,public
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.cn99.com!news.yaako.com!not-for-mail
From: <xiaotiger666@hotmail.com>
Newsgroups: cn.comp.database.mysql
Subject: ���һ��Mysql�����⡣
Date: Mon, 27 Nov 2006 15:19:56 +0800
Organization: Bentium Ltd. (CN99)
Lines: 58
Message-ID: <eke3ir$m6u$1@news.yaako.com>
NNTP-Posting-Host: 61.149.145.255
X-Trace: news.yaako.com 1164611995 22750 61.149.145.255 (27 Nov 2006 07:19:55 GMT)
X-Complaints-To: usenet@news.yaako.com
NNTP-Posting-Date: Mon, 27 Nov 2006 07:19:55 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original