Hi All,
I have developed a web site and I am trying to show some contents on
one of the Web Pages from a Excel file.
I have created a small script but I am getting the error as mentioned
below. Can somebody please help me on this ?
VB Script :
<HTML>
<HEAD></HEAD>
<BODY>
<SCRIPT LANGUAGE="VBScript">
<!--
'## Create Connection and Recordsets
Dim Conn, RS
Set Conn = CreateObject("ADODB.Connection")
Set RS = CreateObject("ADODB.Recordset")
'## The Excel File Name
XLFile = "http://littlemastersachin.com/Documents/Book1.xls"
'## The Data to extract
szSQL = "select * from Events"
'## Create and open the connection
Conn.ConnectionString = "DBQ=" & XLFile & ";DRIVER=Microsoft
Excel
Driver (*.xls);UID=admin;"
Conn.Open
'## set the cursor to be static.
rs.cursortype = 3 ' adStatic.
'## open the recordset
rs.open szSQL, conn
'## Disconnect recordset, eliminate connection
rs.activeconnection = nothing
Conn.Close
Set Conn=nothing
'## iterate through the recordset.
while not rs.eof
response.write RS("name") & " -- "
response.write RS("location") & " -- "
response.write RS("Coordinator") & " -- "
response.write RS("Date") & " -- "
response.write RS("Time") & "<BR>"
rs.movenext
wend
RS.close
Set RS=nothing
-->
</SCRIPT>
</BODY>
</HTML>
When I am opening this page I am getting following error
Line: 28
Char: 5
Error:
Safety settings on this computer prohibit accessing a data source on
another domain.
Code: 0
URL: http://littlemastersachin.com/temp.aspx