Using IF In A Sql Comand With VB

Mar 29, 2008


Hello guys

I need to read if a userID is in a table. If it is not I want to add it.

How can I do that with just one line sql-command using VB.net?

Cheers

View 3 Replies


ADVERTISEMENT

Convert 1st Letter To Uppercase In SQL Comand

Aug 15, 2005

Hi all!This is the problem:User enters student name, in the database, only the 1st letter is uppercase and the rest is  in Lower case.So, I want to fix this so as it is not case sensitive, i.e. the user can enter a name and it will return the recordwhether they enter it in upper or lower case.My Code:CvtUpperCase.Text = UCase(Content.Text)                //stores user's input
   Select Case OptionChoice
       Case "Student_FirstName"            MyCommand = New SqlDataAdapter("select * from [qryStudentDetails] where [qryStudentDetails].[Student_FirstName] like             '" & CvtUpperCase.Text & "'" , myConnection)
....Any ideas??

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved