Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey Guys,

 

I am wanting to search a database for a specific word, well user name. At the moment if the username is 'eb123' and i type in 'eb' it finds the username. i want it to be able to only find the username if the full text is typed can this be done?

 

If you know of a more effective way of storing use settings password usernames etc please let me know.

 

Thanks

  • Administrators
Posted

sql = "SELECT * FROM UserInfo WHERE [userID] ='" & Trim(UsernameTextBox.Text) & "'"

 

would do the trick, however be aware that concatenating strings like that can cause other problems (including security risks), you would be much better off using a parameterised query instead.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...