I need to load a CSV file into an sqlite DB using Realbasic. There is no problem doing this as described in this tutorial.
Can you help me to do this with RealBasic.
I am trying to use the Shell class:
Dim folder As FolderItem = GetFolderItem("")
Dim sh As Shell = new Shell
sh.Mode = 2
If Not sh.IsRunning Then
sh.Execute "sh"
End If
sh.Write( "cd " + folder.ShellPath )
sh.Write( "sqlite3 " + App.GetDatabaseName() + ".sqlite" )
sh.Write( ".separator "",""")
sh.Write( ".import " + FileName + " " + TableName )
PS: there are no error messages during execution, in Shell. But the data does not get imported into the table.
How to fix it?
Thanks!