Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading the remaining hours Pin
Mbah Dhaim14-Sep-08 11:44
Mbah Dhaim14-Sep-08 11:44 
Questionreading Extended Properties from SQL Server 2005 Express Pin
Jassim Rahma14-Sep-08 10:30
Jassim Rahma14-Sep-08 10:30 
QuestionUnable to Call MDI Parent property from MID Client Pin
Muhammad Nauman Yousuf14-Sep-08 8:06
Muhammad Nauman Yousuf14-Sep-08 8:06 
AnswerRe: Unable to Call MDI Parent property from MID Client Pin
Mbah Dhaim14-Sep-08 8:51
Mbah Dhaim14-Sep-08 8:51 
GeneralRe: Unable to Call MDI Parent property from MID Client Pin
Muhammad Nauman Yousuf14-Sep-08 20:32
Muhammad Nauman Yousuf14-Sep-08 20:32 
GeneralRe: Unable to Call MDI Parent property from MID Client Pin
DaveyM6914-Sep-08 22:35
professionalDaveyM6914-Sep-08 22:35 
GeneralRe: Unable to Call MDI Parent property from MID Client Pin
Mbah Dhaim15-Sep-08 6:58
Mbah Dhaim15-Sep-08 6:58 
QuestionSearching Between Dates Pin
Vimalsoft(Pty) Ltd14-Sep-08 6:11
professionalVimalsoft(Pty) Ltd14-Sep-08 6:11 
Good Evening alL

I have an ASP.NET Front end that seaches the Dates in certain Ranges. here is my Data Layer.


C#
 public DataTable Get_Date_by_Month(String Username,String Datefrom, String Dateto)
        {
            con = new OleDbConnection(strcon);

            DataTable Details = new DataTable();
            
            da = new OleDbDataAdapter();

            cmdselect = new OleDbCommand();

            cmdselect.CommandTimeout = 0;
            
            cmdselect.CommandText = "SELECT [Details].[Transportation],[Details].[HOUSING], [Details].[FEEDING], [Details].[UTILITIES], [Details].[INSURANCE],[Details].[TELECOMMUNICATION],[Details].[Entertainment],[Details].[FUEL],[Details].[CLOTHING],[Details].[EDUCATION],[Details].[Miscellaneous],[Details].[BASIC_INCOME], [Details].[OTHER_INCOME] FROM [Details] INNER JOIN USERS  ON Details.[P_ID] = [USERS].[ID] Where Details.Username = ? And Details.[DATE] Between  ?  AND ? ";
            
            cmdselect.CommandType = CommandType.Text;

            cmdselect.Connection =con;

            da.SelectCommand = cmdselect;

            da.SelectCommand.Parameters.Add("[Username]", OleDbType.VarChar, 30).Value = Username;
           
            da.SelectCommand.Parameters.Add("[DATE]",OleDbType.Date, 30).Value = Convert.ToDateTime(Datefrom).ToShortTimeString();

            da.SelectCommand.Parameters.Add("[DATE]", OleDbType.Date, 30).Value = Convert.ToDateTime(Dateto).ToShortTimeString();

             
            try
            {
                con.Open();

                Details.Clear();

                da.Fill(Details);
                

            }
            catch(OleDbException)
            {
                throw;
            }
            finally
            {
                con.Close();
            }
            return Details;
        }    
<pre>

but now if i try to Search between Valid Ranges, it Brings nothing to the DAtagrid. Am Using Access 2003

Thanks 

<div class="ForumSig">Vuyiswa Maseko,

Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding 

VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za

</div>

AnswerRe: Searching Between Dates Pin
Mbah Dhaim14-Sep-08 7:00
Mbah Dhaim14-Sep-08 7:00 
QuestionGDI problem, Drawing rectangle by drag and drop. Pin
hdv21214-Sep-08 2:37
hdv21214-Sep-08 2:37 
AnswerRe: GDI problem, Drawing rectangle by drag and drop. Pin
Mbah Dhaim14-Sep-08 4:56
Mbah Dhaim14-Sep-08 4:56 
AnswerRe: GDI problem, Drawing rectangle by drag and drop. Pin
Anthony Mushrow14-Sep-08 5:03
professionalAnthony Mushrow14-Sep-08 5:03 
Question? operator wuestion Pin
Mohammad Dayyan14-Sep-08 1:57
Mohammad Dayyan14-Sep-08 1:57 
AnswerRe: ? operator wuestion [modified] Pin
Perspx14-Sep-08 2:12
Perspx14-Sep-08 2:12 
GeneralRe: ? operator wuestion Pin
Lutosław14-Sep-08 2:56
Lutosław14-Sep-08 2:56 
GeneralRe: ? operator wuestion Pin
Guffa14-Sep-08 3:43
Guffa14-Sep-08 3:43 
GeneralRe: ? operator wuestion Pin
Perspx14-Sep-08 3:48
Perspx14-Sep-08 3:48 
QuestionUsing the office 2007 Ribbon ( drag-n-drop a window without using the border ) [modified] Pin
Mahhouraaaaaa14-Sep-08 1:22
Mahhouraaaaaa14-Sep-08 1:22 
AnswerRe: Using the office 2007 Ribbon ( drag-n-drop a window without using the border ) Pin
The Cake of Deceit14-Sep-08 9:37
The Cake of Deceit14-Sep-08 9:37 
QuestionDebugging External .exe Pin
Jammer14-Sep-08 1:03
Jammer14-Sep-08 1:03 
AnswerRe: Debugging External .exe Pin
Jimmanuel14-Sep-08 9:18
Jimmanuel14-Sep-08 9:18 
QuestionWhat am I doing wrong with this OnPaint override? Pin
Dewald14-Sep-08 0:17
Dewald14-Sep-08 0:17 
AnswerRe: What am I doing wrong with this OnPaint override? Pin
Anthony Mushrow14-Sep-08 0:57
professionalAnthony Mushrow14-Sep-08 0:57 
GeneralRe: What am I doing wrong with this OnPaint override? Pin
Dewald14-Sep-08 2:08
Dewald14-Sep-08 2:08 
QuestionRe: What am I doing wrong with this OnPaint override? [modified] Pin
Dewald14-Sep-08 3:59
Dewald14-Sep-08 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.