Having loads of troubles with this.
Heres the code I have now...
PHP Code:
Test
<%
'## Create Connection and Recordsets
[s][s][s][s]Dim Conn, RS[/s][/s][/s][/s]
[s][s][s][s]Set Conn = CreateObject("ADODB.Connection")[/s][/s][/s][/s]
[s][s][s][s]Set RS = CreateObject("ADODB.Recordset")[/s][/s][/s][/s]
'## The Data to extract
[s][s][s][s]szSQL = "select * from 'EM JULY-04'"[/s][/s][/s][/s]
'## Create and open the connection
[s][s][s] [/s][/s][/s]
[s][s][s][s]Conn.Open "Driver={Driver do Microsoft Excel(*.xls)};" & "DBQ=" & Server.MapPath("test.xls") & ";"[/s][/s][/s][/s]
'## set the cursor to be static.
[s][s][s][s]rs.cursortype = 3 ' adStatic.[/s][/s][/s][/s]
'## open the recordset
[s][s][s][s]rs.open szSQL, Conn[/s][/s][/s][/s]
'## Disconnect recordset, eliminate connection
[s][s][s][s]rs.activeconnection = nothing[/s][/s][/s][/s]
[s][s][s][s]Conn.Close[/s][/s][/s][/s]
[s][s][s][s]Set Conn=nothing[/s][/s][/s][/s]
'## 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
%>
Page is just coming up as 500 internal server error. im not even able to see the "Test Hi" listed at the begining of the page. Anyone got any ideas of what needs to be changed or added. Just trying to do a simple read excel and display to screen. As i've never done this before im a bit clueless as to the correct connection string or whatever else i may need.