viewpoint-particle

Author Topic: SQLite - Sidebar  (Read 907 times)

td

  • Tech Support
  • *****
  • Posts: 3460
    • WinBatch
Re: SQLite - Sidebar
« Reply #35 on: May 26, 2020, 08:33:19 am »
You have a two-dimensional array because you created one not because any dotNet method returned one.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1174
Re: SQLite - Sidebar
« Reply #36 on: May 26, 2020, 02:06:13 pm »
You have a two-dimensional array because you created one not because any dotNet method returned one.


Exactly, that was the point. A few posts ago, I concluded that parsing text files into .NET then moving into the extender was not a wise choice. Still, I taken the extra time to create a WB array, the INSERT still didn't work with the Extender - ArrayFileGetCsv() did. Just asked why?

td

  • Tech Support
  • *****
  • Posts: 3460
    • WinBatch
Re: SQLite - Sidebar
« Reply #37 on: May 27, 2020, 08:15:58 am »
That your created 2-dimensional array didn't work in the extender is obviously what I missed.  Pure speculation on my part but the reason it didn't work could be because your rank 2 array elements are variants and might require a little additional processing before they can be passed to SQLite.  The additional processing is something that could be done in the extender but it would require a bit of coding to accomplish.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

  • Pundit
  • *****
  • Posts: 1174
Re: SQLite - Sidebar
« Reply #38 on: May 27, 2020, 04:34:35 pm »
That your created 2-dimensional array didn't work in the extender is obviously what I missed.  Pure speculation on my part but the reason it didn't work could be because your rank 2 array elements are variants and might require a little additional processing before they can be passed to SQLite.  The additional processing is something that could be done in the extender but it would require a bit of coding to accomplish.


Interesting. Reportview has no issue with the array. Might be worth testing if I assigned the elements as ObjectType("BSTR"),just to see if it achieves the same as dbInsertBatch(db,SQLText,ArrayFileGetCsv("WakeCounty.csv", 0, @TAB),@FALSE).

JTaylor

  • Pundit
  • *****
  • Posts: 1362
    • Data & Stuff Inc.
Re: SQLite - Sidebar
« Reply #39 on: May 27, 2020, 05:32:35 pm »
Guess I missed something too as I thought you were passing the oTables Array.  I will go back and take a look as well.

Jim

That your created 2-dimensional array didn't work in the extender is obviously what I missed.  Pure speculation on my part but the reason it didn't work could be because your rank 2 array elements are variants and might require a little additional processing before they can be passed to SQLite.  The additional processing is something that could be done in the extender but it would require a bit of coding to accomplish.


Interesting. Reportview has no issue with the array. Might be worth testing if I assigned the elements as ObjectType("BSTR"),just to see if it achieves the same as dbInsertBatch(db,SQLText,ArrayFileGetCsv("WakeCounty.csv", 0, @TAB),@FALSE).

JTaylor

  • Pundit
  • *****
  • Posts: 1362
    • Data & Stuff Inc.
Re: SQLite - Sidebar
« Reply #40 on: May 27, 2020, 07:17:13 pm »
I figured out how to convert BSTR at least and assume I would have to check types and convert all of them.  I think I would have to know you were sending Variants ahead of time but maybe there is a way around that???   Or create a different function.

Of course, this works too and is easier, on me anyway  ;)

ArrayFilePutCSV("array.txt",arrData,@TAB)
arrData = ArrayFileGetCSV("array.txt",0,@TAB)

stanl

  • Pundit
  • *****
  • Posts: 1174
Re: SQLite - Sidebar
« Reply #41 on: May 28, 2020, 02:51:37 am »
I figured out how to convert BSTR at least and assume I would have to check types and convert all of them.  I think I would have to know you were sending Variants ahead of time but maybe there is a way around that???   Or create a different function.

Of course, this works too and is easier, on me anyway  ;)

ArrayFilePutCSV("array.txt",arrData,@TAB)
arrData = ArrayFileGetCSV("array.txt",0,@TAB)


Test wakecounty.csv had 66 rows, but when you get beyond 100,000 rows writing an array to file and back to an array is a bit much. I think we can settle that there are issues with .net DataTables.  I was drawn to them having to deal with SEQUENCE objects in both Hana and SQL Server. They are BigInt and generally default to a number like -9223372036854775808.

JTaylor

  • Pundit
  • *****
  • Posts: 1362
    • Data & Stuff Inc.
Re: SQLite - Sidebar
« Reply #42 on: May 28, 2020, 05:24:54 am »
I know...I am just lazy  :)

If it is something you would use, I will put it on my list and see if I can make it happen.   It would be a good exercise for learning about all the variant sub-types.

Jim

td

  • Tech Support
  • *****
  • Posts: 3460
    • WinBatch
Re: SQLite - Sidebar
« Reply #43 on: May 28, 2020, 07:59:05 am »
Interesting. Reportview has no issue with the array.

That is because the WIL interpreter does all kinds of magic that makes it possible for variants to be just another variable (or array element) from the perspective of the user. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade