Ask a Question related to ASP Database, Design and Development.
-
jt #1
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
-
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... -
recordset query not working
hello, im using asp and dreamweavers automated features. the following query works select * from table where dateexp >= now so expired... -
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... -
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... -
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... -
Bob Barrows [MVP] #2
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#)> 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
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
-
jt #3
Re: Getting 0 recordset in MS Access Query
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:uLB7uC4PEHA.3232@TK2MSFTNGP11.phx.gbl...DATEADD("d",1,#2004/04/01#)> 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 <Thanks! Worked great!>
> Bob Barrows
>
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
-
Bob Barrows [MVP] #4
Re: Getting 0 recordset in MS Access Query
jt wrote:
? Why do you need a popup?>>>
>> 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
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.
The user should only need to enter a single date.> to along the use
> enter the dates as parameters, then the query to execute.
>
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
-
jt #5
Re: Getting 0 recordset in MS Access Query
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eU5QmU$PEHA.3660@tk2msftngp13.phx.gbl...code> 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-sideits> which is off-topic in an asp newsgroup. Look for a group with "dhtml" ina> name, or go to one of the .scripting groups: probably the jscript group.
>> The user should only need to enter a single date.> > to along the use
> > enter the dates as parameters, then the query to execute.
> >
>
> 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 itThat is exactly what I wish to do, to have it prompt the user to enter the> 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
> --
date.
Thanks for this lesson.
jt
jt Guest



Reply With Quote

