Why is this code giving me these errors:
Error:
Then when I try to debug:
This is the code:
Error:
Line:26
Syntaxt Error
Then when I try to debug:
An exception 'Runtime Error' has occurred in Script.
However, no debuggers are registered that can debug this exception. Unable to JIT debug.
This is the code:
Code:
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8">
<script id=clientEventHandlersVBS language=vbscript>
<!--
Sub btnPrep_onclick
Dim oAccess
Dim oImportDB
Dim oExportDB
Dim strConn
Dim oConn
Dim rs
Dim strSQL
MsgBox "Start"
On Error Resume Next
strConn = "DBQ=H:\Data\MyScripts\_IWrote\PrepareImport\darden.mdb;DRIVER={Microsoft Access Driver (*.mdb)};"
Set oConn = CreateObject("ADODB.Connection")
MsgBox "Conn: " & Err.Description
oConn.Open strConn
MsgBox "OpenConn: " & Err.Description
Set rs = CreateObject("ADODB.Recordset")
MsgBox "rs: " & Err.Description
strSQL = Select * FROM tblContactList"
rs.Open strSQL, oConn
If rs.EOF Then
MsgBox "No Records"
Else
Do While Not rs.EOF
MsgBox rs("Id")
rs.MoveNext
Loop
End If
rs.close
Set rs = Nothing
oConn.Close
Set oConn = Nothing
End Sub
-->
</script>
</HEAD>
<BODY>
<!-- Insert HTML here -->
<input id=btnPrep type=button value="Prepare for Import">
</BODY>
</HTML>