Forum Discussion
joffre
14 years agoRegular Contributor
That really is working, but with one problem.
Instead of my variable "s" receive the number of "Tabela criada" that exists in my file, it is receiving the number 158. There are just 2 "Tabela criada" in my entire file.
-----
Is it possible for me to count how many "CREATE TABLE" are in a file?
Instead of my variable "s" receive the number of "Tabela criada" that exists in my file, it is receiving the number 158. There are just 2 "Tabela criada" in my entire file.
Sub Procurar
Path = "D:\Scripts\Logs\Oracle\Ora10g"
s = aqFile.ReadWholeTextFile(Path&"\1-1.txt", aqFile.ctANSI)
s = aqString.Find(s, "Tabela criada")
aqFile.Create(Path&"\LogsFinais\1-1.txt")
If (s <> -1) Then
Call aqFile.WriteToTextFile(Path&"\LogsFinais\1-1.txt", "Tabelas criadas!", aqFile.ctANSI)
Log.Message("Tabelas criadas!")
Log.Message(s)
Else
Call aqFile.WriteToTextFile(Path&"\LogsFinais\1-1.txt", "Tabelas não criadas!", aqFile.ctANSI)
Log.Error(s)
End If
End Sub
-----
Is it possible for me to count how many "CREATE TABLE" are in a file?