tcgoh Active Member Licensed User Longtime User Aug 2, 2014 #1 Hi, I am trying to save a File.writelist from DBUtils.ExecuteMemoryTable but the results are [Ljava.lang.string;@43dld538 ......... What am doing wrong with these codes B4X: Dim list as List list = DBUtils.ExecuteMemoryTable(SQL,"SELECT name FROM table1", Null,0) File.WriteList(File.DirRootExternal,"sqllist.txt",list) Thanks for helping
Hi, I am trying to save a File.writelist from DBUtils.ExecuteMemoryTable but the results are [Ljava.lang.string;@43dld538 ......... What am doing wrong with these codes B4X: Dim list as List list = DBUtils.ExecuteMemoryTable(SQL,"SELECT name FROM table1", Null,0) File.WriteList(File.DirRootExternal,"sqllist.txt",list) Thanks for helping
LucaMs Expert Licensed User Longtime User Aug 2, 2014 #2 First of all, change the variable name "list" to "lstNames", for example (also "table1"...!) Then, try to open "sqllist.txt" ("lstNames.txt" could be better) because it should be right. Upvote 0
First of all, change the variable name "list" to "lstNames", for example (also "table1"...!) Then, try to open "sqllist.txt" ("lstNames.txt" could be better) because it should be right.
tcgoh Active Member Licensed User Longtime User Aug 2, 2014 #3 Yes the Dim Listname as list has been changed. Opening the txt file give me the same results... [Ljava.lang.string;@43dld538 ......... Upvote 0
Yes the Dim Listname as list has been changed. Opening the txt file give me the same results... [Ljava.lang.string;@43dld538 .........
LucaMs Expert Licensed User Longtime User Aug 2, 2014 #4 Opening or ... using log(lstNames)? Upvote 0
tcgoh Active Member Licensed User Longtime User Aug 2, 2014 #5 same results [Ljava.lang.string;@43dld538 ......... The codes is not right! not the naming I think Upvote 0
LucaMs Expert Licensed User Longtime User Aug 2, 2014 #6 #Region "ExecuteMemoryTable" 'Executes the query and returns the result as a list of arrays. 'Each item in the list is a strings array. Sorry, I had forgotten that function. It returns a list but each element of the list is a list that is a record. Upvote 0
#Region "ExecuteMemoryTable" 'Executes the query and returns the result as a list of arrays. 'Each item in the list is a strings array. Sorry, I had forgotten that function. It returns a list but each element of the list is a list that is a record.
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2014 #7 You are trying to save a list of arrays in a text file. It will not work like this. The simplest solution is to use RandomAccessFile.WriteObject (or KeyValueStore class). Upvote 0
You are trying to save a list of arrays in a text file. It will not work like this. The simplest solution is to use RandomAccessFile.WriteObject (or KeyValueStore class).