Getting 0 recordset in MS Access Query

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Getting 0 recordset in MS Access Query

    Hi,

    I'm trying to do a sql query on a date column, like this

    SELECT * FROM [PSUSA] WHERE Call_Date = #04/01/2004#

    No errors in the statement, but 0 recordsets found. I have plenty dates with
    this.

    Also, my actual contents in Call_Date field has time as well. I just need to
    query on dates not time.

    Example how the data is in the field. "4/23/2004 10:59:15 AM"

    Any ideas what I could be doing wrong. Us MS Access 2002 version.

    Thanks,
    jt




    jt Guest

  2. Similar Questions and Discussions

    1. Problems with Recordset (Query) in Dreamweaver BindingsPanel
      Coldfusion Gurus- I keep getting this error when I try to make a connection to my database using the Dreamweaver Bindings Panel: "There are no...
    2. recordset query not working
      hello, im using asp and dreamweavers automated features. the following query works select * from table where dateexp >= now so expired...
    3. ASP/SQL Query Recordset up to 200 characters?
      Is it possible through SQL to query a recordest lets say a memo description feild for lets say only the first 200 characters? Or To somehow...
    4. using Command to set Parameters and Recordset to retrive the Query
      Hi guys, withou using SP, I want to be able to add a Parameter to the SQL Query and retrive the Recordset so I can use the Paging property under...
    5. PHP & Simple Recordset Query
      Why can't I open the simple dialog box on recordset queries with PHP? It works with ASP but I can open a blank PHP page in a Blank site and still get...
  3. #2

    Default Re: Getting 0 recordset in MS Access Query

    jt wrote:
    > Hi,
    >
    > I'm trying to do a sql query on a date column, like this
    >
    > SELECT * FROM [PSUSA] WHERE Call_Date = #04/01/2004#
    >
    > No errors in the statement, but 0 recordsets found. I have plenty
    > dates with this.
    >
    > Also, my actual contents in Call_Date field has time as well. I just
    > need to query on dates not time.
    >
    > Example how the data is in the field. "4/23/2004 10:59:15 AM"
    >
    > Any ideas what I could be doing wrong. Us MS Access 2002 version.
    >
    > Thanks,
    > jt
    WHERE Call_Date >= #2004/04/01# AND Call_Date < DATEADD("d",1,#2004/04/01#)

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows [MVP] Guest

  4. #3

    Default Re: Getting 0 recordset in MS Access Query


    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:uLB7uC4PEHA.3232@TK2MSFTNGP11.phx.gbl...
    > jt wrote:
    > > Hi,
    > >
    > > I'm trying to do a sql query on a date column, like this
    > >
    > > SELECT * FROM [PSUSA] WHERE Call_Date = #04/01/2004#
    > >
    > > No errors in the statement, but 0 recordsets found. I have plenty
    > > dates with this.
    > >
    > > Also, my actual contents in Call_Date field has time as well. I just
    > > need to query on dates not time.
    > >
    > > Example how the data is in the field. "4/23/2004 10:59:15 AM"
    > >
    > > Any ideas what I could be doing wrong. Us MS Access 2002 version.
    > >
    > > Thanks,
    > > jt
    >
    > WHERE Call_Date >= #2004/04/01# AND Call_Date <
    DATEADD("d",1,#2004/04/01#)
    >
    > Bob Barrows
    >
    Thanks! Worked great!

    Now the problem is getting how to get a popup box to along the use enter the
    dates as parameters, then the query to execute.

    jt


    jt Guest

  5. #4

    Default Re: Getting 0 recordset in MS Access Query

    jt wrote:
    >>
    >> WHERE Call_Date >= #2004/04/01# AND Call_Date <
    >> DATEADD("d",1,#2004/04/01#)
    >>
    >> Bob Barrows
    >>
    >
    > Thanks! Worked great!
    >
    > Now the problem is getting how to get a popup box
    ? Why do you need a popup?
    If you're convinced you need a popup, then you need to use client-side code
    which is off-topic in an asp newsgroup. Look for a group with "dhtml" in its
    name, or go to one of the .scripting groups: probably the jscript group.
    > to along the use
    > enter the dates as parameters, then the query to execute.
    >
    The user should only need to enter a single date.

    If you are testing the query in Access (recommended), change the query to
    this:

    .... WHERE Call_Date >= [pDate] AND Call_Date < DATEADD("d",1,[pDate])

    When you test it, Access will prompt you for the value to be used for the
    pDate parameter. When you run it from asp, you will supply that value
    programmatically.

    When you are satisfied that the query works, save it in Access, giving it a
    name such as qGetCallsByDate. In asp, do this:

    <%
    dim dDate, cn, rs
    dDate = cDate(request.form("date"))
    'create and open the connection object
    set rs=server.createobject("adodb.recordset")
    cn.qGetCallsByDate dDate, rs
    'process the data in the recordset
    %>

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows [MVP] Guest

  6. #5

    Default Re: Getting 0 recordset in MS Access Query


    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:eU5QmU$PEHA.3660@tk2msftngp13.phx.gbl...
    > jt wrote:
    > >>
    > >> WHERE Call_Date >= #2004/04/01# AND Call_Date <
    > >> DATEADD("d",1,#2004/04/01#)
    > >>
    > >> Bob Barrows
    > >>
    > >
    > > Thanks! Worked great!
    > >
    > > Now the problem is getting how to get a popup box
    >
    > ? Why do you need a popup?
    > If you're convinced you need a popup, then you need to use client-side
    code
    > which is off-topic in an asp newsgroup. Look for a group with "dhtml" in
    its
    > name, or go to one of the .scripting groups: probably the jscript group.
    >
    > > to along the use
    > > enter the dates as parameters, then the query to execute.
    > >
    > The user should only need to enter a single date.
    >
    > If you are testing the query in Access (recommended), change the query to
    > this:
    >
    > ... WHERE Call_Date >= [pDate] AND Call_Date < DATEADD("d",1,[pDate])
    >
    > When you test it, Access will prompt you for the value to be used for the
    > pDate parameter. When you run it from asp, you will supply that value
    > programmatically.
    >
    > When you are satisfied that the query works, save it in Access, giving it
    a
    > name such as qGetCallsByDate. In asp, do this:
    >
    > <%
    > dim dDate, cn, rs
    > dDate = cDate(request.form("date"))
    > 'create and open the connection object
    > set rs=server.createobject("adodb.recordset")
    > cn.qGetCallsByDate dDate, rs
    > 'process the data in the recordset
    > %>
    >
    > Bob Barrows
    > --
    That is exactly what I wish to do, to have it prompt the user to enter the
    date.

    Thanks for this lesson.

    jt


    jt Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139