sam1 0 Posting Whiz

Hi,

I am trying to output some data from sql db within excel to XML.

I am updating the sql db from the excel worksheet and then outputting the records from the db to xml.

I have used CDATA to parse html within xml but i can only get one record from the db although there are more.

Here is a piece of the code:

& "<BODY> <![CDATA[<head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />" _
      & "<title>Untitled Document</title>" _
      & "</head>" _
      & "<body><table width=""100%"" border=""1"">" _
      & "<tr><th scope=""col"">Supplier Branch</th>" _
      & "<th scope=""col""><p>" & "]]>" & s1.Range("supplier") & "<![CDATA[</p></th>" _
      & "</tr>" _
      & "<td colspan=""5"">&nbsp;</td>" _
      & "<tr>" _
      & "<th scope=""col"">PO Number</th>" _
      & "<th scope=""col"">" & "]]>" & rs1!PurchaseOrderNo & "<![CDATA[ </th>" _
      & "<th scope=""col"">&nbsp;</th>" _
      & "<th scope=""col"">Job ID</th>" _
      & "<th scope=""col""><p>" & "]]>" & rs1!jobid & "<![CDATA[</p></th>" _
      & "</tr>" _
      & "<tr>" _
      & "<td colspan=""5"">&nbsp;</td></tr>";
      Print #f, "<tr>" _
      & "<td>QTY</td>" _
      & "<td>Part No</td>" _
      & "<td>Description</td>" _
      & "<td>Unit Price</td></tr>" _
      & "<tr><td>" & rs1!quantity & "</td>" _
      & "<td>" & rs1!PartNo & "</td>" _
      & "<td>" & rs1!PartDescription & "</td>" _
      & "<td>" & rs1!PartPrice & "</td>" _
      & "<td>&nbsp;</td>" _
      & "</tr>" _
      & "</table>" _
      & "</body>" & "]]>" & "</BODY>" _

Now there are more than 1 rows of quantity, PartNo, PartDescription and PartPrice. What i need is some sort of loop there to go through the recordset and output all records in a html table within xml which I have not been able to implement.

Any help will be highly appreciated.

Thanks.