|
<%
response.write(" ") ' Selected constants from adovbs.inc 'Const adOpenStatic = 3 'Const adLockPessimistic = 2 Dim rstExcel Dim I Dim iCols Dim Count Dim strSQL Dim J Dim c(10) Dim columns Dim flag flag=0 strSQL="SELECT * FROM TestData;" DIM cnnExcel Set cnnExcel = Server.CreateObject("ADODB.Connection") cnnExcel.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ=" & Server.MapPath("../spreadsheets/Suites.xls") Set rstExcel = Server.CreateObject("ADODB.Recordset") rstExcel.CursorType = 3 rstExcel.LockType = 2 rstExcel.Open strSQL, cnnExcel 'cnnExcel.Execute(strSQL) iCols = rstExcel.Fields.Count %>
|