Advertisement
Advertisement
| 08.05.2008 at 10:15AM PDT, ID: 23623029 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsMasterRolodex 'Holds the recordset for the records in the database
'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("eddys.mdb")
'Create an ADO recordset object
Set rsMasterRolodex = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT MASTER_Rolodex.* FROM MASTER_Rolodex ORDER BY Year, Month;"
'Open the recordset with the SQL query
rsMasterRolodex.Open strSQL, adoCon
Dim counter
counter=0
'Loop through the recordset
Do While not rsMasterRolodex.EOF
counter=counter+1
'Write the HTML to display the current record in the recordset
IF 0=(counter Mod 2) Then
Response.Write "<tr class='even'><td>" & rsMasterRolodex.Fields("Month") & "</td>"
Else
Response.Write "<tr class='odd'><td>" & rsMasterRolodex.Fields("Month") & "</td>"
End If
Response.Write "<td>" & rsMasterRolodex.Fields("Year") & "</td>"
Response.Write "<td>" & rsMasterRolodex.Fields("Name") & "</td>"
Response.Write "<td>" & rsMasterRolodex.Fields("Category") & "</td>"
Response.Write "<td>" & rsMasterRolodex.Fields("Story") & "</td>"
Response.Write "</tr>"
'Move to the next record in the recordset
rsMasterRolodex.MoveNext
Loop
%>
|