C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

Very urgetn using c# how to search the database recodrs alphabetical wise


Posted Date: 07 Jan 2009      Posted By: vijay      Member Level: Bronze     Points: 1   Responses: 1



using c# how to search the database recodrs alphabetical wise (dynamic table structure)




Responses

Author: Syed Shakeer Hussain     07 Jan 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 3

Hi
Using the % Wildcard:

Now we want to select the persons living in a city that starts with "sa" from the "Persons" table.

We use the following SELECT statement:

SELECT * FROM Persons
WHERE City LIKE '%s'

SqlCommand cmd=new SqlCommand("SELECT * FROM Persons
WHERE City LIKE '%s'",conn);

SqlDatReader reader=Cmd.ExecuterRader();
while(reader.Read())
{
//gridview show here

}

}


Thanks & Regards!
Syed Shakeer Hussain



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : to move a value from one form to another form..
Previous : printing
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use