I am stumped on this… everything works on the dev machine… except this:
[code]’ *****************************************************
’ Author: The “Dude” Exists
’ System: Linux Mint
’ Owner: The “Dude” Exists
’ E-Mail: thedudeexists@emailaddress.net
’ Phone: (999) 888-6666
’ *****************************************************
// Preliminary code…
’ – : NONE DEFINED : –
// Variable declarations…
Var fldrItem As FolderItem
Var txtInput As TextInputStream
Var rowFromFile, oneCell As String
Var dbRow As New DatabaseRow
// Functions…
fldrItem = FolderItem.ShowOpenFileDialog(“text/plain/csv”) // defined as a FileType
If fldrItem <> Nil Then
txtInput = TextInputStream.Open( fldrItem ) // Read the input stream into a file…
txtInput.Encoding = Encodings.UTF8 // Set encoding…
Var strRead As String = txtInput.ReadAll // Read the newly encoded
txtInput.Close // Close the input stream
strRead = Trim( strRead ) // Trim off trailing/leading blanks
strRead = ReplaceLineEndings( strRead, EndOfLine ) // Can’t remember… but I need this line…
Var strLine( ) As String = Split( strRead, EndOfLine ) ’ Break down to individual lines and load into array for further processing…
For A As Integer = 0 To UBound( strLine ) // Loop until all lines are completed…
Dim strField( ) As String = Split( strLine( A ),"," ) ’ Separate out each field value from each line…
// Add input for insert query....
dbRow.Column("barcode").StringValue = strField( 0 )
dbRow.Column("plantNomen").StringValue = strField( 1 )
dbRow.Column("tillCategory").StringValue = strField( 2 )
Try
dbJHGCGC.AddRow("tblPlantInfo", dbRow)
Catch error As DatabaseException
MessageBox("DB Error: " + error.Message)
End Try
Next
End If[/code]
I get this error: “Operation cannot be completed because the database is closed.” – yet I can insert new records from input fields, update and so forth… I have a simple 3 column csv I am trying to import into an existing table…