Re: SELECT DISTINCT For Month and Year?
Thanks, but I still have the same issue. I now think the problem is with the ASP. I ran they query in the MySQL Control Center and it worked. But when I call the query in ASP it gives me the question marks as the output. Any ASPers here that know what the issue is? Is there another way other than asp to display the query on the page? (without losing the .asp page extension of course).
Here is my code:
-----------
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=MySQL_dsn"
objConn.Open
DIM mySQL
mySQL = "SELECT (DATE_FORMAT(DateEntered,'%M %Y')) as mon_yr FROM Y4K GROUP BY mon_yr;"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
<html>
<body>
<% DO WHILE NOT objRS.EOF %>
<% Response.Write objRS("mon_yr") %>
<%
objRS.MoveNext
Loop
%>
</body>
<%
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
-----------
Thanks,
- James
Subject
Written By
Posted
February 08, 2005 10:29AM
February 08, 2005 12:44PM
February 10, 2005 09:46AM
February 10, 2005 10:00AM
February 11, 2005 10:15AM
February 11, 2005 11:20AM
February 11, 2005 11:33AM
February 15, 2005 10:33AM
February 15, 2005 12:34PM
February 16, 2005 11:32AM
Re: SELECT DISTINCT For Month and Year?
February 16, 2005 05:00PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.