Text Validation against db

TheSlayerIsBack

New member
Joined
Apr 24, 2008
Messages
2
Programming Experience
Beginner
well i need to validate the text being typed into a textbox, i need it to check my database and make sure theres not a equal name or text.

i hope that was clear:p

thanks in advance
 
One way to do it and I know this isn't the best, but you could check the DB with a query with the contents of the textbox as the where clause of the sql statement and if the dataview.count is larger than zero, it's in the DB already
 
Dude, its for sure one of the best!

I love the sarcasm, in the programs I work with we already have a List (usually of string) that contains all the records for that field in memory, so I simply check the new value against that list and if it's not in the list then it gets added to the DB.
 
I love the sarcasm, in the programs I work with we already have a List (usually of string) that contains all the records for that field in memory, so I simply check the new value against that list and if it's not in the list then it gets added to the DB.


Lol.. it was actually serious. All my sarcasm is appened with a :p smily ;)
Running a quick count on a field is the easiest way.


What do you do with a table of a million records? Have a million long list? I wouldnt use a List for that.. lookup is very slow
 
Lol.. it was actually serious. All my sarcasm is appened with a :p smily ;)
Running a quick count on a field is the easiest way.


What do you do with a table of a million records? Have a million long list? I wouldnt use a List for that.. lookup is very slow

Yes, but we're only talking about a list of 500 or less (usually 200)
 

Latest posts

Back
Top