Click here to Skip to main content
15,902,198 members
Home / Discussions / C#
   

C#

 
QuestionFiltering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 0:17
nassimnastaran10-Aug-11 0:17 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
Shameel10-Aug-11 0:38
professionalShameel10-Aug-11 0:38 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
MicroVirus10-Aug-11 3:30
MicroVirus10-Aug-11 3:30 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
GenJerDan10-Aug-11 3:54
GenJerDan10-Aug-11 3:54 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 3:58
BobJanova10-Aug-11 3:58 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
GenJerDan10-Aug-11 4:01
GenJerDan10-Aug-11 4:01 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
MicroVirus10-Aug-11 4:05
MicroVirus10-Aug-11 4:05 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 3:57
BobJanova10-Aug-11 3:57 
Your code has SQL injection written all over it, though I'm not sure how protective the DataView is (i.e. whether it passes that filter through to any database level processor where it could do real damage). Even if it protects you in this instance, get into the habit of escaping anything you put in a query string (and that's what that filter string is).

I agree with MicroVirus that you probably want the account to be an int and use =. With double you can use int or you can use (AccountNo>=value-delta) AND (AccountNo<=value+delta) where delta is a comparison tolerance value which you should pick.
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 4:23
nassimnastaran10-Aug-11 4:23 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 8:25
BobJanova10-Aug-11 8:25 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
Ian Shlasko10-Aug-11 4:01
Ian Shlasko10-Aug-11 4:01 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
loyal ginger10-Aug-11 4:13
loyal ginger10-Aug-11 4:13 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 4:41
nassimnastaran10-Aug-11 4:41 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
loyal ginger10-Aug-11 4:51
loyal ginger10-Aug-11 4:51 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 5:38
nassimnastaran10-Aug-11 5:38 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
loyal ginger10-Aug-11 6:17
loyal ginger10-Aug-11 6:17 
Questionhow to transfer file from computer to terminal (windows-mobile) Through FTP Pin
goldsoft9-Aug-11 23:12
goldsoft9-Aug-11 23:12 
AnswerRe: how to transfer file from computer to terminal (windows-mobile) Through FTP Pin
Pravin Patil, Mumbai10-Aug-11 3:11
Pravin Patil, Mumbai10-Aug-11 3:11 
QuestionPayment gateway Integration into my website Pin
srikanthpoolla9-Aug-11 22:04
srikanthpoolla9-Aug-11 22:04 
AnswerRe: Payment gateway Integration into my website Pin
Richard MacCutchan9-Aug-11 23:24
mveRichard MacCutchan9-Aug-11 23:24 
AnswerRe: Payment gateway Integration into my website Pin
Pravin Patil, Mumbai10-Aug-11 0:47
Pravin Patil, Mumbai10-Aug-11 0:47 
Questionfile in use error Pin
goldsoft9-Aug-11 21:18
goldsoft9-Aug-11 21:18 
AnswerRe: file in use error Pin
OriginalGriff9-Aug-11 21:30
mveOriginalGriff9-Aug-11 21:30 
AnswerRe: file in use error Pin
Thomas R. Wolfe10-Aug-11 2:20
Thomas R. Wolfe10-Aug-11 2:20 
GeneralRe: file in use error Pin
OriginalGriff10-Aug-11 2:22
mveOriginalGriff10-Aug-11 2:22 

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.