不支持关键字:'username'。 [英] Keyword not supported: 'username'.

查看:136
本文介绍了不支持关键字:'username'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不支持关键字:'用户名'。



说明:执行当前网络请求时发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.ArgumentException:不支持关键字:'username'。



源错误:





第14行:private void FillData()

第15行:{

第16行:SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings [Constr]。ToString());

第17行:SqlDataAdapter da = new SqlDataAdapter(select * from emp,con);

第18行:DataSet ds = new DataSet();

Keyword not supported: 'username'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Keyword not supported: 'username'.

Source Error:


Line 14: private void FillData()
Line 15: {
Line 16: SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Constr"].ToString());
Line 17: SqlDataAdapter da= new SqlDataAdapter("select *from emp",con);
Line 18: DataSet ds = new DataSet();

推荐答案

检查web.config文件中的连接字符串你可能正在使用username而不是userid
check connection string in web.config file u may be using username instead of userid


检查你的查询。

您的查询格式可能有误,因此您似乎使用 username 作为关键字。
Check your query.
Your query format could be wrong and hence it seems you are using username as a keyword.


这篇关于不支持关键字:'username'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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