<% ' -- Make Database Connection DIM objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "DSN=myCONNECTION.dsn" objConn.Open %> <% ' -- Perform SQL query for Product X DIM mySQL1, objRS1 mySQL1 = "Select Value from SalesBar where Year=2004 and Product='X' ORDER BY Month" Set objRS1 = Server.CreateObject("ADODB.Recordset") objRS1.Open mySQL1, objConn ' -- Perform SQL query for Product Y DIM mySQL2, objRS2 mySQL2 = "Select Value from SalesBar where Year=2004 and Product='Y' ORDER BY Month" Set objRS2 = Server.CreateObject("ADODB.Recordset") objRS2.Open mySQL2, objConn %> <% DIM iDataCount ' Construct data Param tags for series 1 iDataCount = 0 DO WHILE NOT objRS1.EOF iDataCount = iDataCount + 1 %> <% objRS1.MoveNext Loop objRS1.Close %> <% ' Construct data Param tags for series 2 iDataCount = 0 DO WHILE NOT objRS2.EOF iDataCount = iDataCount + 1 %> <% objRS2.MoveNext Loop objRS2.Close %> <% ' Close Database Connection objConn.Close() Set objConn = Nothing %>