Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
AnswerRe: Remembering Variables Pin
avigodse26-Nov-09 19:20
professionalavigodse26-Nov-09 19:20 
Questionhow to validate name with databae table (no space) Pin
LTMKH24-Nov-09 17:27
LTMKH24-Nov-09 17:27 
AnswerRe: how to validate name with databae table (no space) Pin
dan!sh 24-Nov-09 18:08
professional dan!sh 24-Nov-09 18:08 
AnswerRe: how to validate name with databae table (no space) Pin
Mycroft Holmes24-Nov-09 18:48
professionalMycroft Holmes24-Nov-09 18:48 
AnswerRe: how to validate name with databae table (no space) Pin
Shameel24-Nov-09 23:07
professionalShameel24-Nov-09 23:07 
GeneralRe: how to validate name with databae table (no space) Pin
LTMKH27-Nov-09 15:57
LTMKH27-Nov-09 15:57 
GeneralRe: how to validate name with databae table (no space) Pin
Shameel27-Nov-09 18:54
professionalShameel27-Nov-09 18:54 
GeneralRe: how to validate name with databae table (no space) Pin
LTMKH27-Nov-09 20:33
LTMKH27-Nov-09 20:33 
ok, this is my original question:
I want to validate category name before insert all information about category into database.
The following condition is the way that i want to compare:
Ex: ------------------------------------------------------------------------
| name in TblCategory | name in Text box | comparative result |
------------------------------------------------------------------------
| white bag-----------| whitebag---------|---existing---------|
------------------------------------------------------------------------
| whitebag----------- | white bag------- |----existing--------|
------------------------------------------------------------------------
| White Bag-----------|--white bag ------|---- existing ------|
------------------------------------------------------------------------


I use this following function in sql database:
BEGIN
IF EXISTS(SELECT TOP 1 *
FROM TblCategory c
WHERE (c.c_name=@name OR c.c_name=REPLACE(@name,' ',''))
AND c.c_id <> @id
)
SET @result=1
ELSE
SET @result =0
END

this give me bad result if TblCategory (white bag) and TextBox to compare has word(whitbag)...this can't compare to me

then you you tell me to do this :

WHERE (REPLACE(c.c_name,' ','')=REPLACE(@name,' ',''))

but this replace is only replace my field name(c.c_name) but not give me validation to insert category infomation
GeneralRe: how to validate name with databae table (no space) Pin
Shameel27-Nov-09 21:54
professionalShameel27-Nov-09 21:54 
GeneralRe: how to validate name with databae table (no space) Pin
LTMKH30-Nov-09 15:16
LTMKH30-Nov-09 15:16 
GeneralRe: how to validate name with databae table (no space) Pin
LTMKH30-Nov-09 15:18
LTMKH30-Nov-09 15:18 
QuestionC# ADO.net Adapter Update Question. Pin
adamzimmer24-Nov-09 17:00
adamzimmer24-Nov-09 17:00 
AnswerRe: C# ADO.net Adapter Update Question. Pin
PIEBALDconsult24-Nov-09 18:18
mvePIEBALDconsult24-Nov-09 18:18 
GeneralRe: C# ADO.net Adapter Update Question. Pin
adamzimmer25-Nov-09 4:42
adamzimmer25-Nov-09 4:42 
AnswerRe: C# ADO.net Adapter Update Question. Pin
Mycroft Holmes24-Nov-09 18:52
professionalMycroft Holmes24-Nov-09 18:52 
AnswerRe: C# ADO.net Adapter Update Question. Pin
dxlee25-Nov-09 3:52
dxlee25-Nov-09 3:52 
GeneralRe: C# ADO.net Adapter Update Question. Pin
adamzimmer25-Nov-09 4:52
adamzimmer25-Nov-09 4:52 
QuestionMSMQ Pin
Tiger45624-Nov-09 7:11
Tiger45624-Nov-09 7:11 
AnswerRe: MSMQ Pin
Jimmanuel24-Nov-09 7:31
Jimmanuel24-Nov-09 7:31 
AnswerRe: MSMQ Pin
David Skelly24-Nov-09 22:35
David Skelly24-Nov-09 22:35 
QuestionWindows App Published with Visual Studio 2005 comes up blank Pin
JTRizos24-Nov-09 7:01
JTRizos24-Nov-09 7:01 
QuestionChange Calendar Type of DateTimePicker ? Pin
Mohammad Dayyan24-Nov-09 6:17
Mohammad Dayyan24-Nov-09 6:17 
AnswerRe: Change Calendar Type of DateTimePicker ? Pin
Abhishek Sur24-Nov-09 11:16
professionalAbhishek Sur24-Nov-09 11:16 
QuestionWindows service schedule Pin
Priya Prk24-Nov-09 4:16
Priya Prk24-Nov-09 4:16 
AnswerRe: Windows service schedule Pin
Calla24-Nov-09 4:24
Calla24-Nov-09 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.