Jump to content

[CR] SQLite API


Recommended Posts

Does anyone use RowID a lot?

I'm finding that the more I use the API the more annoyed I am at having to always put a True boolean for No RowID (might be just my use cases). I'm thinking about inverting it so that the default is no rowid. Would this cause lots of issues to people already using it (if any...lol)

Link to comment

The Implode 1D array separates the field/value pairs. The value would be the datatype, isn t it? For example, integer, real etc.

So, how should I input these values. If I want the datatype to be real and field name time, should I say "time/real" or "time real" ?

Please advise.

Thanks,

Subhasis

Link to comment

The Implode 1D array separates the field/value pairs. The value would be the datatype, isn t it? For example, integer, real etc.

So, how should I input these values. If I want the datatype to be real and field name time, should I say "time/real" or "time real" ?

Please advise.

Thanks,

Subhasis

The implode 1D array implodes (or concatenates rather than separates) each value in the array to a quoted string. The value is. Well. the value (e.g 3.1). the Field is the field name (e.g Time).

If you want to set an affinity for a field (REAL, INTEGER, TEXT et al.), that is achieved when you create the fields with the "Create" table. Anything can be written to any field type and SQLite will convert it to the defined affinity for storage. The API always writes and reads as a string (it uses a string basically like a variant), but SQLite converts it automagically.

Link to comment
  • 3 weeks later...

Hi,

How to read the files. When I try to read a 100 mb file using SQLite_Select, I get the memory full message.

Thanks,

Subhasis

Not giving me much to go on here. ph34r.gif

What gives you the message? Is it windows/linux? It can't be in the error cluster because there is no "Memory Full" error code. If it is in the error cluster, what number (code) is it?

Are you trying to dump the whole 100MB contents into an array? (What is the SQL statement?) How much memory do you have and when you get the error, how much is LabVIEW using (you can see it in task manager)?blink.gif

Link to comment

I am using windows XP. have 3 gigs ram. Yes, I try to dump all the contents of 100 mb into 5 different arrays. Is there a better way of doing this?

Well, while I was replying, I tried again to generate the error message. But, It worked alright this time.

Thanks,

Subhasis

Not giving me much to go on here. ph34r.gif

What gives you the message? Is it windows/linux? It can't be in the error cluster because there is no "Memory Full" error code. If it is in the error cluster, what number (code) is it?

Are you trying to dump the whole 100MB contents into an array? (What is the SQL statement?) How much memory do you have and when you get the error, how much is LabVIEW using (you can see it in task manager)?blink.gif

Link to comment

Just wanted to point out a small bug I found in Query Transaction.vi in 1.3.0. You have the cases switched in the case structure that includes the rowid. It's probably something leftover from when you switched the logic of the boolean.

Also, since this is my first time commenting on this, thank you. This has been a lifesaver for me.

Link to comment

Just wanted to point out a small bug I found in Query Transaction.vi in 1.3.0. You have the cases switched in the case structure that includes the rowid. It's probably something leftover from when you switched the logic of the boolean.

Also, since this is my first time commenting on this, thank you. This has been a lifesaver for me.

Confirmed.

I'll leave it a week or two so to see if anything else crops up then release a bug fix.

  • Like 1
Link to comment

Confirmed.

I'll leave it a week or two so to see if anything else crops up then release a bug fix.

Just to clarify the interim fix for this:

  1. Locate and open SQLite_Query-Transaction.VI (It is in the "Query" Virtual folder under "Core".
  2. Right-click on the case structure (there is only one)
  3. Select "Make This Case True" from the popup menu
  4. Save the VI

It should now work as intended.

Edited by ShaunR
Link to comment

Just to clarify the interim fix for this:

  1. Locate and open SQLite_Query-Transaction.VI (It is in the "Query" Virtual folder under "Core".
  2. Right-click on the case structure (there is only one)
  3. Select "Make This Case True" from the popup menu
  4. Save the VI

It should now work as intended.

Correction of this bug will also have a knock-on effect on SQLite Delete Column.vi and SQLite_Rename Column.vi causing them to fail.

In each of these VIs there is a boolean (True) wired to the SQLite_Query-Transaction.vi. This boolean needs to be deleted.

The VIS will then work correctly.

Link to comment
  • 2 weeks later...

Hi,

I am trying to read sqlite files in labview of 350 mb size in a computer having 3 gigs of ram and has windows xp.

I could read txt files of that size in this computer, even with a 2 gig ram. but, unable to open files of size larger than even 80 megs.

I run into out of memory problem. Is there any way I could read this kind of files.

Link to comment

Hi,

I am trying to read sqlite files in labview of 350 mb size in a computer having 3 gigs of ram and has windows xp.

I could read txt files of that size in this computer, even with a 2 gig ram. but, unable to open files of size larger than even 80 megs.

I run into out of memory problem. Is there any way I could read this kind of files.

The SQLite API is quite capable of reading 350MB plus files (I've just read a 450MB one). Your issue is probably to do with LabVIEW memory management.

If you are putting an indicator on the front panel. Don't. biggrin.gif

LV Memory Memory Management 101:

File-size 456MB win 7 X64 LV x32

500 for the VI 0 wire junctions Requires 500 MB during and after execution.

500 MB for the VI, 500MB for the 1 wire junction, 500MB for the 1 indicator. Requires 1.5GB whilst executing (assuming it has already run once) and 1 GB after execution.

Add 1 more indicator and it will run out of memory. Why?....Because.....

500MB for the VI, 1GB for the 2 wire junctions, 1GB for the 2 indicators. Requires 2.5 GB whilst executing (assuming it has already run once) and 1.5 GB after execution.

Very approximate calculations, but I think you get the idea.

1. You need n x wire junctions more memory whilst running than you do with a static VI after execution

2. you need n x indicators memory to store the results.

Link to comment

I could read txt files of that size in this computer, even with a 2 gig ram. but, unable to open files of size larger than even 80 megs.

I run into out of memory problem. Is there any way I could read this kind of files.

I while back a had a similar problem (LV 8.5.1):

when using the "Read From Spreadsheet file.vi for reading (and displaying) a 60 MB spreadsheet (text-file) my PC got a memoryincrease of approx 1 GB !!

When replacing the "Read From Spreadsheet file.vi" with "Read from text-file" (with Read lines active) followed by a for-loop to convert each line to a string-array,

I got the same result BUT ony a memory-usage of several 100ths MB.

(I would have expected 2*60 MB with a little overhead in memory-usage but this was way better than the original memory-usage)

Has anyone seen the same effect as well?

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.