Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

I have a DataGrid that displays the mebers on my page. I have made a Alpha numeric paging using Query Strings.

 

This is the SQL Im using:

"SELECT ID, Usernamn, Surname & ' ' & Lastnamn As Name, regDatum & ' ' & regTime As Reg FROM tblMembers WHERE Username Like 'A%' ORDER BY Username"

 

It does only display the Usernames that vegins with an big "A" and not the small "a".

 

Ive tried this SQL to correct that but no luck:

"SELECT ID, Usernamn, Surname & ' ' & Lastnamn As Name, regDatum & ' ' & regTime As Reg FROM tblMembers WHERE Username Like 'A%' OR Username Like 'a%' ORDER BY Username"

 

And another problem is that the SQl wont get any other letter either, If I remove the "A" and replace it with the letter "D" then it wont get all the post on letter D. As long as it is the letter "A" then it will get the info but not post that beggins with "a".

 

Can someone help me????

 

//Andi

Posted

Are you sure you're comparing the right field? I see you're selecting Usernamn but comparing Username.

 

Usernamn Like 'A%' ?

 

Otherwise there is no reason why that shouldn't get both Upper and Lowercase names.

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...