I'm trying to create a pivot table populated by server side recordset. The
reason I have server side script is to hide connection,password, etc from
the client. But since pivot tables are client side I need the server side
to populate my pivot table.
I have tried the code below to better explain:

<OBJECT classid="clsid:0002E520-0000-0000-C000-000000000046" width="518"
height="384" id="PivotTable1" VIEWASTEXT>
<PARAM NAME="XMLData" VALUE='<xml xmlns:x="urn:schemas-microsoft-comffice:excel">
<x:PivotTable> <x:OWCVersion></x:OWCVersion>
<x:CacheDetails/> </x:PivotTable> </xml>'>


dim ssql
dim sTable

sSql = "SELECT * from Pubs"

set objRs=SQLGetRecordset(sSql)


ptable="<script language=VBScript> <BR>"
ptable=ptable & "sub Window_onload() <br> PivotTable1.AutoFit = True <BR>"
ptable=ptable & "set rs =CreateObject(""Adodb.Recordset"") <BR>"
ptable=ptable & "set rs=" & SQLGetRecordset(sSql)
ptable=ptable & "document.write rs.fields(1).value <BR>"
ptable=ptable & "</script><BR>"

response.write ptable


I'm getting a type mismatch in
ptable=ptable & "set rs=" & SQLGetRecordset(sSql)