' Reads & executes a set of SQL Non-Query type commands from a file.
' Great For creating tables, views, complex indices, etc. in those cases In which you don't want to use the other DBUTIL commands.
' Uses standard SQL syntax.
Sub ExecSQLCommandsFromFile (SQL As SQL, fileDir As String, fileName As String)
Dim List1 As List
List1 = File.ReadList(fileDir, fileName)
Log ("Reading Batch SQL Statements from " & fileDir & "/" & fileName)
Log (List1.Size & " BATCH SQL STATEMENTS FOLLOW")
For Each Cmd As String In List1
Log(Cmd)
SQL.AddNonQueryToBatch(Cmd,Null)
Next
Log ("BATCH SQL STATEMENTS END")
SQL.ExecNonQueryBatch("SQL")
End Sub