|
BEGINNING OF ASP CODE <% Response.Write "Robin1 " ' Initialize Variables Set conn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") ' Connect to the Database accessdb="\FSBO\fpdb\Campaigns.mdb" myDSN="DRIVER={Microsoft Access Driver (*.mdb)};" myDSN=myDSN & "DBQ=" & server.mappath(accessdb) conn.open myDSN ' Create the SQL Query sqlStmt = "SELECT * FROM Campaigns" ' Run the SQL Query RS.open sqlStmt, conn, 3, 3 Response.Write("Robin2 ") If RS.EOF = True then Response.Write("No homes were found for your search.") Else Response.Write("found =")& RS("ID") %> BEGINNING OF ASP CODE LOOP <% ' Loop through the results Do While RS.EOF = False %> Client = <%=RS("ClientName")%>, CampaignName = <%=RS("CampaignName")%>, MonthlyBudget = <%=RS("MonthlyBudget")%> <% RS.MoveNext Loop ' Close the Recordset RS.Close ' Close the database conn.Close %> That's all. <%End If%> |