Click here to Skip to main content
12,299,648 members (44,868 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
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'.
Posted 21-Feb-12 1:49am
Edited 19-Feb-13 7:33am
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100