Hello,
I have an asp script that returns different record. The problem that I am having is that the script returns the same record twice.
here is what my code looks like
I have an asp script that returns different record. The problem that I am having is that the script returns the same record twice.
here is what my code looks like
Code:
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the record to be updated
Dim strSQL
dim totalValue 'Holds the SQL query for the database
'Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
'lngRecordNo =CLng(Request.QueryString("ID"))
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("na.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM gm, weeks order by total DESC"
<body>
<%
If Not rsGuestBook.EOF Then
Do while not rsGuestBook.EOF
fields
.
.
%>
</body>
<%
'Increment the count by 1 to get the next number
rsGuestBook.MoveNext
Loop
End If
'Reset server objects
rsGuestbook.Close
Set rsGuestbook = Nothing
Set adoCon = Nothing
%>