Click here to Skip to main content
15,848,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to run this sql query to populate the gridview in my webform,

SELECT userinfo.user_id "User",userinfo.User_last_login "Last Login",orginfo.Dept,orginfo.Div FROM UserInfo 
INNER JOIN OrgInfo  ON userinfo.Org_Code=orginfo.org_code  
WHERE userinfo.User_ID= 'txtUserId.text'

the userinfo.user_ID value is coming from the textfield

gridview is populating with userId,lastlogin,Dept,Div columns

thnks in advance..

[edit]Code block added, SQL formatted for readability - OriginalGriff[/edit]
Updated 30-Mar-13 22:45pm
Zoltán Zörgő 31-Mar-13 3:10am    
And your question is...?
OriginalGriff 31-Mar-13 3:46am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

"SELECT userinfo.user_id as User, userinfo.User_last_login as [Last Login], orginfo.Dept, orginfo.Div FROM UserInfo INNER JOIN OrgInfo ON userinfo.Org_Code=orginfo.org_code WHERE userinfo.User_ID='" + txtUserId.text + "';"
Share this answer
Maciej Los 31-Mar-13 15:24pm    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900