Help Needed(Query)

Results 1 to 2 of 2

Thread: Help Needed(Query)

  1. #1
    Join Date
    Dec 1969

    Default Help Needed(Query)

    HI All,<BR><BR>I am facing a problem actually i had developed timesheet module and now i want to use query for administrator use depending on the start date and end date it should show the relevant information from that table and for that i am using one asp page from where i am selecting dates and in other page collecting values but i don&#039t know how to proceed i am placing the code below so could somebody look at it and give me some sugguestion.<BR>&#060;%<BR>str = CDate(request.form("ma")& "/" &request.form("mb") & "/" & request.form("mc"))<BR>strTemps = CDate(request.form("b1")& "/" &request.form("b2") & "/" & request.form("b3"))<BR>Set Con=Server.CreateObject("ADODB.Connection")<BR>Con .Open("Driver={SQL Server}; Server=webservernew;uid=sa;pwd=;DATABASE=timesheet ")<BR>Set RS = Server.CreateObject("ADODB.Recordset")<BR>RS.Curso rType = adOpenStatic<BR>RS.Open "SELECT User_Name, sDate, Activity, Duration, Process_id, Reviewed FROM EmpTrans WHERE sdate &#062;=&#039"& str &"&#039 & sdate &#060;="&#039 & strtemps & "&#039 ORDER BY User_Name"&#039"Con<BR><BR>if RS.EOF then<BR> Response.Write "No records"<BR>else<BR> Response.Write "Records Retrieved"<BR>end if<BR>%&#062;<BR>

  2. #2
    subzer0 Guest

    Default RE: Help Needed(Query)

    You don&#039t tell us what the problem is but from what I see in your code (aprt from missing stuff) you don&#039t have the correct date format for MSSQL (if that&#039s what you&#039re running). It should be yyyy-mm-dd hh:mm:ss

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts