Click here to Skip to main content
Rate this: bad
good
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
0 Maciej Los 225
1 Manfred R. Bihy 190
2 CHill60 180
3 _Amy 155
4 OriginalGriff 150
0 OriginalGriff 7,320
1 Sergey Alexandrovich Kryukov 6,043
2 Maciej Los 3,754
3 Peter Leow 3,448
4 CHill60 2,572


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2014
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