更新此ListView中的用户信息有什么问题? [英] What is the wrong with updating the user information in this ListView?

查看:90
本文介绍了更新此ListView中的用户信息有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于Web的Intranet应用程序,它有一个用于管理其用户的部分。我正在尝试使用ListView控件开发此部件。除了更新员工的信息外,一切正常。在解释问题之前,让我向您解释数据库设计:



员工表:用户名,名称,分区代码

分部表:DivisionCode,Division


(每个表中的第一个属性是主键)



我有问题更新员工的部门,当我尝试时,我收到以下错误:

无效的列名称''用户名''。

解决方案

亲爱的朋友,



试试这个: -



将您的列名括在方括号[]中。如果您的列名包含特殊字符,空格或关键字,则会发生这种情况。



例如:

从yourTable中选择[列名] 


I am developing an intranet web-based application which has a part for managing its users. I am trying to develop this part using a ListView Control. Everything works fine except updating the information of the employee. Before explaining the problem, let me explain to you the database design:

Employee Table: Username, Name, DivisionCode
Division Table: DivisionCode, Division

(The first attribute in each table is the primary key)

I have a problem with updating the division for the employee and when I tried to do, I got the following error:
Invalid column name ''Username''.

解决方案

Dear Friend,

Try this:-

enclose your column name in square braces []. This happens in case your column name contains special Characters, spaces, or key words.

eg:

select [column name] from yourTable


这篇关于更新此ListView中的用户信息有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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