解析查询时出错 [英] Error parsing the query

查看:76
本文介绍了解析查询时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net网络表单创建一个网站。我创建了一个SQL Server compact 4.0本地数据库。在尝试插入数据时,我得到了最后3天的错误,并且无法修复它。救命!!!这个错误说:

I am creating a site with asp.net web-forms. I created a SQL Server compact 4.0 local database. While trying to insert data, i get an error for the last 3days and cant fixe it. Help!!! this error said:

" There was an error parsing the query. [ Token line number = 1,Token line offset = 48,Token in error = insert ] "

HERE IS MY LINES OF CODES:¨
"
INSERT INTO login
(username, password) 
Values ('kriss', 'aspnet');

"

推荐答案

您好克里斯蒂安,

您的解决方案只是更改密码的名称字段,因为密码是SQL中的保留字... :-)



Like-:
Hi Kristian,
Your solution is just change the name of password field, because password is reserved word in SQL... :-)

Like-:
INSERT INTO login
(username, pswd)
Values ('kriss', 'aspnet');


实际上系统似乎没有接受username或password作为字段名称。所以我改变了两个。感谢JCahyaatnttearjee的解决方案指导我。

感谢大家



Actually the system doesn't seems to accept either "username" or "password" as field names. So i changed both. Thanks to JCahyaatnttearjee who's solution guided me.
Thanks to you all

INSERT INTO login
                         (login_username, login_pwsd)
VALUES        ('aspnet', 'site')


这篇关于解析查询时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆