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
    Michael Lane Guest

    Default what help do you need?

    What help are you looking for. Are you getting errors?<BR><BR>If you are using a date field, you may need to use the "#" delimiter in your query when comparing date/time columns to your string variables.

Posting Permissions

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