Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2004, 01:32 PM
Authorized User
 
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response.

I use mysql.
I wrote the element you told me in one line, not two lines, but it didnt work.

The code line of the master page is:

Recordset1.Source = "SELECT * FROM 29articles WHERE datew<=now() ORDER BY datew DESC"

The code line of detail page is:

Recordset1.Source = "SELECT * FROM 29articles WHERE Id = " + Replace(Recordset1__MMColParam, "'", "''") + ""


Thanks in advance

 
Old March 23rd, 2004, 01:39 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Where is the AND clause I showed you for the Details page? It's missing.

Also, is Now() supported in MySQL??

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 23rd, 2004, 01:55 PM
Authorized User
 
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your response.

Now() is supported in mysql, i use it in master page.

The code line of detail page is without the addition you told me.
I added it and it gave the error i posted previously.

Here is the complete line that give me the error

Recordset1.Source = "SELECT * FROM 29articles WHERE Id = " + Replace(Recordset1__MMColParam, "'", "''") + "AND datew <= Now()"

What should be changed in order the page display normally?

Thanks in advance

 
Old March 23rd, 2004, 02:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You accidentally left out a space I had in my original post:

 "AND datew <= Now()"

should be

 " AND datew <= Now()"

with a space before the AND keyword to separate it from the first WHERE clause.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 23rd, 2004, 02:19 PM
Authorized User
 
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You were right!

Now everything is ok, and nobody can view the records of the future dates.

You really helped me a lot.
Thank you very much, I appreciate much your support.


 
Old March 23rd, 2004, 02:30 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome. Glad you got it working.

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Wizard on Master Page AspNetGuy BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 June 5th, 2008 09:19 AM
Using Master Page in ASp.net 2.0 dilipv .NET Framework 2.0 1 March 4th, 2008 07:00 AM
VS2008 Master page error in <asp:contentPlaceHolde JesseTutterrow ASP.NET 2.0 Basics 1 December 10th, 2007 12:17 PM
ASP.NET and Master Page ayazhoda ASP.NET 2.0 Basics 5 May 14th, 2007 04:22 PM
JScripts on ASP.NET Master page? woojtii Javascript How-To 0 March 28th, 2007 05:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.