 |
| 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
|
|
|
|

March 23rd, 2004, 01:32 PM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 23rd, 2004, 01:39 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 23rd, 2004, 01:55 PM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 23rd, 2004, 02:04 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 23rd, 2004, 02:19 PM
|
|
Authorized User
|
|
Join Date: Nov 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

March 23rd, 2004, 02:30 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You're welcome. Glad you got it working.
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |