Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / February 2008

Tip: Looking for answers? Try searching our database.

Queries and Now()

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig - 01 Feb 2008 23:43 GMT
Hi

Using Access 2007.

I have a database in mdb format that records the information of customer
sales on  a web site. In the OrderDate field I am using Now() to record the
date and time the order is placed.

I also have a query which displays only currently open orders.

When I view either the table or query data locally within Access the
date/time information of each order displays correctly.

Likewise, when I view the table data online via an ASP VB web page, the
date/time information of each order displays correctly

However, when I view query data online via an ASP VB web page, the date/time
information of each order displays as the date/time of the most recent
order.

Why is this???

And how can I get the correct data to display? (I realize that I can use the
table data directly by filtering the data in ASP, but would rather use the
query.)

(On a similar note, I've noticed that a query that is sorted by a randomly
generated number always sorts records randomly within Access but the records
always appear in the same order when the query is viewed online through an
ASP VB page.)

Thanks,

Craig
Amy Blankenship - 01 Feb 2008 23:51 GMT
> Hi
>
[quoted text clipped - 17 lines]
>
> Why is this???

What is the code?
Craig - 02 Feb 2008 00:25 GMT
What code? In the ASP page?

It's Now()  in the Access table for the OrderDate field.

>> Hi
>>
[quoted text clipped - 19 lines]
>
> What is the code?
Amy Blankenship - 06 Feb 2008 22:02 GMT
> What code? In the ASP page?
>
> It's Now()  in the Access table for the OrderDate field.

By the time you're running your query to display the data, it should already
have been stored.  So, yes, your ASP code.
Craig - 06 Feb 2008 16:00 GMT
What code are you referring to? On the ASP page?

>> Hi
>>
[quoted text clipped - 19 lines]
>
> What is the code?
Michel Walsh - 06 Feb 2008 16:24 GMT
I suspect your ASP implementation optimizes something it should not. It may
also be version dependant, such as ASP.Net 3.5  or previous versions. Sure,
that sounds like I try to send the problem to ASP, but if the query behaves
correctly within Access... Can you try to get the data from, say, Excel, or
from MS SQL Server, or from a dataview tool from C#, to see if it get as
Access, or as your ASP implementation shows it, letting Excel (MS SLQ
Server, C#) determines who is the source of the problem, kind of ... :-)

Vanderghast, Access MVP

> Hi
>
[quoted text clipped - 30 lines]
>
> Craig
Craig - 06 Feb 2008 21:23 GMT
Could you say that again in English?  ;-)

>I suspect your ASP implementation optimizes something it should not. It may
>also be version dependant, such as ASP.Net 3.5  or previous versions. Sure,
[quoted text clipped - 40 lines]
>>
>> Craig
Amy Blankenship - 06 Feb 2008 22:05 GMT
> Could you say that again in English?  ;-)
>
[quoted text clipped - 6 lines]
>>(MS SLQ Server, C#) determines who is the source of the problem, kind of
>>... :-)

I think what he is saying is that the problem is probably in your ASP code
and not the query.  So probably in the loop where you think you've changed
what you're looking at, you're changing it for everything but the
misbehaving field.  So maybe you store that field's value above the loop,
and you're always retrieving the same value.
Michel Walsh - 07 Feb 2008 14:35 GMT
Exactly, thanks. In addition, ASP settings themselves may possibly cache
some data it perceives as 'constant', avoiding a round trip to the server.
That is why I suggest to use another tool, to see the data, for yourself,
not to write your application, no, but to determine, hopefully, if the
problem is within Access, or with ASP. If the third tool shows data as in
Access, then the ASP code you use is probably the problem, not the Access
query that you use.

Vanderghast, Access MVP

>> Could you say that again in English?  ;-)
>>
[quoted text clipped - 12 lines]
> misbehaving field.  So maybe you store that field's value above the loop,
> and you're always retrieving the same value.
Craig - 14 Feb 2008 05:38 GMT
Could you put that a little more clearly, please?

Craig

>I suspect your ASP implementation optimizes something it should not. It may
>also be version dependant, such as ASP.Net 3.5  or previous versions. Sure,
[quoted text clipped - 40 lines]
>>
>> Craig
Amy Blankenship - 14 Feb 2008 15:48 GMT
> Could you put that a little more clearly, please?

If you post your ASP code, we can look at it and probably tell you exactly
where the problem is.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.