C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




ABOUT DOT NET DATE PARAMER RIZE QUERY


Posted Date: 30 Aug 2008      Total Responses: 1

Posted By: Patel Bhavesh vanjibhai       Member Level: Bronze     Points: 1


I have problem I Have one table fac_present table and in (present,name) two Field its
stored Dates Now I took two textboxs and one button,one datagrid in vb dot net framework 1.0 I want in Button click event :-- In two textboxes I passed two date and I Want total Faculty name between this date pls help me.




Responses

Author: Karthikeyan S    30 Aug 2008Member Level: GoldRating:     Points: 6
Hi,

In button click event get the two dates value from the two text boxes and pass these value to sql query. Then use dataadapter to get the data from database to the dataset and set the datasource for the datagrid as dataset.

Here the important point is we have to write a query which will return active faculty names between the selected from and end dates.

Following is the sample query:

string lstrQuery =
"SELECT
ID,
FacultyName
FROM
Faculty_Table
WHERE Faculty_ActiveStartDate IS BETWEEN " + TEXTBOX1.TEXT +
" AND " + TEXTBOX2.TEXT + " OR
Faculty_ActiveEndDate IS BETWEEN " + TEXTBOX1.TEXT +
" AND " + TEXTBOX2.TEXT

Note: If you find your requirement varies depending upon startdate and enddate, change the where condition accordingly.



Post Reply
You must Sign In to post a response.
Next : dought
Previous : titles
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

audio conferencing services

Contact Us    Privacy Policy    Terms Of Use