On Windows 7 32Bits
Way the file is on the Folder App
Dim f As FolderItem
Dim t As TextInputStream
#if DebugBuild then
f=GetFolderItem(“C:\GasRB\Sql01.sqlite”)
#Else
f=GetFolderItem(“Sql01.sqlite”)
#endif
If f.FileNotFound=101 Then
MsgBox “File no found” <<<<<< Way the file is on the Folder App
Exit Sub
End If
Try
if f.LastErrorCode = 101 Then
Hi
I have the same problem
When the file not exist then it continue with out the file and i have a error on t=TextInputStream.Open(f)
Dim f As FolderItem
Dim dd As String
Dim IsDataOn As Boolean
Dim t As TextInputStream
IsDataOn=False
#if DebugBuild then
f=GetFolderItem(“C:\GasRB\Sqlite.txt”)
#Else
f=GetFolderItem(“Sqlite.txt”)
#endif
If f.LastErrorCode=101 then Exit Sub
If f <> Nil then
t=TextInputStream.Open(f)
//t.Encoding=Encodings.MacRoman //specify encoding of input stream
t.Encoding=Encodings.UTF8
Do
dd=t.ReadLine
If dd.len > 10 Then
IsDataOn=True
ConfigDB.SQLExecute(dd)
If ConfigDB.Error Then
MsgBox "Error Scrip Sqlite " + ConfigDB.ErrorMessage
End If
ConfigDB.Commit
If ConfigDB.Error Then
MsgBox "Error Commit Scrip Sqlite " + ConfigDB.ErrorMessage
End If
End If
Loop until t.EOF=True
t.Close
#if DebugBuild then
#Else
f.Delete
#endif
If IsDataOn=True Then
MsgBox "*** DataBase Have UpDate App go to Close ***"
Quit
End If
End if
don’t do this. you have to use second parameter for GetFolderitem if it is not just the file name.
hi christian
What is this
use second parameter for GetFolderitem
i try like
f=GetFolderItem("").Parent.Child(“Sqlite.txt”)
and no works
Now Works using
If f.Exists=False Then Exit sub
in the DebugBuild works but on the compiler version no works
maybe you could try
dim f as FolderItem = GetFolderItem("C:\\GasRB\\Sql01.sqlite", FolderItem.PathTypeNative)