Listing D



Function fnRunSQL(sFilePath, sSQL)

 Dim bRetVal, oConn

 If sFilePath = "" Then

       bRetVal = FALSE

 ElseIf sSQL = "" Then

       bRetVal = FALSE

 Else

       Set oConn = Server.CreateObject("ADODB.Connection")

       On Error Resume Next

       oConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(sFilePath))

       If Err.Number = 0 Then

              On Error Resume Next

              oConn.Execute sSQL

              If Err.Number = 0 Then

                     bRetVal = TRUE

              Else

                     bRetVal = FALSE

              End If

              oConn.Close

       Else

             bRetVal = FALSE

       End If

       Set oConn = Nothing

 End If

 fnRunSQL = bRetVal

End Function