Search found 63 matches: sqlite blob

Searched query: sqlite blob

by stam
Mon Mar 11, 2024 2:21 pm
Forum: Talking LiveCode
Topic: Reading and writing text to / from a file
Replies: 26
Views: 142086

Re: Reading and writing text to / from a file

... Didn't think I'd need to further clarify, but since you explicitly ask:
SQLite is file storage and while accessed with similar commands to RDBMS's ... records in a >127,000 record, very complex medical imaging database with BLOB image data took an average 93 milliseconds on 10 reads. I suspect that ...
by terryho
Sun Oct 17, 2021 4:35 pm
Forum: Talking LiveCode
Topic: Saving img to mySQL
Replies: 16
Views: 27061

Re: Saving img to mySQL

... script will read the table and image file in "c:temp"

The save blob in sqlite is some different with mysql or odbc, so there is 2 method to insert blob data in sqlite db

I think in mysql will need base64encode to storage blob field, but in my case I don't need base64encode to storage blob ...
by FourthWorld
Tue May 04, 2021 9:38 pm
Forum: Talking LiveCode
Topic: Limitations of Dynamically Executing Script in LC
Replies: 20
Views: 16875

Re: Limitations of Dynamically Executing Script in LC

... cool would it be to have the app (or just card) definition stored in an SQLite db on a phone !?

The LC stack file format is very compact. If you need to store it in a DB you can use a blob field, but unless you need to manage the blog with relational metadata you'll find reading LC stack files from ...
by bwmilby
Fri Jun 19, 2020 5:01 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Encryption and SQLite
Replies: 13
Views: 16109

Re: Encryption and SQLite

Here's an updated stack that uses BLOB.
I updated the file to include the "binary" opening of the database.
by LCMark
Fri Jun 19, 2020 4:20 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Encryption and SQLite
Replies: 13
Views: 16109

Re: Encryption and SQLite

... correctly (I think, at least).

The first is to ensure you open the sqlite db in "binary" mode - pass "binary" as the third parameter when opening ... data rather than text. This inserts the value of the var as an SQLite blob literal, rather than a string literal.

The final thing to do is to only ...
by bwmilby
Fri Jun 19, 2020 3:55 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Encryption and SQLite
Replies: 13
Views: 16109

Re: Encryption and SQLite

... then your generalization is correct. Using base64encode/decode is a safe way to get binary data in/out of a VARCHAR field in the database. It isn't the only way to store the data though. You could use the BLOB type to avoid needing to convert, but I've not experimented with it to provide specifics.
by lohill
Thu Jun 18, 2020 4:47 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Encryption and SQLite
Replies: 13
Views: 16109

Re: Encryption and SQLite

... is a bug somewhere. I just don't know whether it is in LiveCode or SQLite or my understanding of the concepts involved. It may well be in my ... its original state. In the SQLite database I have tried the datatype of blob as well as nvarchar. Here are the steps:

1. Unzip the stack "Encryption ...
by n.allan
Fri May 15, 2020 12:10 pm
Forum: Databases
Topic: SQLite Database BLOB is identified as STRING
Replies: 3
Views: 47450

Re: SQLite Database BLOB is identified as STRING

... Your solution has solved the problem. The data type is now showing as BLOB and the full chunk of data is now in the tImage variable.

my final ... db as "binary" and this has corrected the issue
put revOpenDatabase("sqlite","countries-raster.mbtiles", "binary") into tID -- open the database ...
by LCMark
Fri May 15, 2020 11:48 am
Forum: Databases
Topic: SQLite Database BLOB is identified as STRING
Replies: 3
Views: 47450

Re: SQLite Database BLOB is identified as STRING

@n.allan: The sqlite driver originated with SQLite2 which did not support binary data... This meant that binary data had to be explicitly encoded as ... tID -- open the database

The 'binary' option turns off the encoding LC would do otherwise, and should mean BLOBs are stored and retrieved as BLOBs.
by bangkok
Fri May 15, 2020 11:43 am
Forum: Databases
Topic: SQLite Database BLOB is identified as STRING
Replies: 3
Views: 47450

Re: SQLite Database BLOB is identified as STRING

... to aid in debugging

set the defaultFolder to specialFolderPath("resources") -- place the database file beside the stack
put revOpenDatabase("sqlite","countries-raster.mbtiles") into tID -- open the database
if tID is not a number then -- In my test tID is a valid integer meaning the connection ...
by n.allan
Fri May 15, 2020 10:01 am
Forum: Databases
Topic: SQLite Database BLOB is identified as STRING
Replies: 3
Views: 47450

SQLite Database BLOB is identified as STRING

I am having trouble reading BLOB data from an SQLite database file.

In my sqlite database there is a table called tiles. The columns in it are zoom_level (INTEGER), tile_row (INTEGER), tile_column (INTEGER) and tile_data (BLOB).

For anyone "in the know" these are industry standard raster ".mbtiles ...
by lohill
Sun May 03, 2020 2:19 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Encryption and SQLite
Replies: 13
Views: 16109

Encryption and SQLite

... AUTOINCREMENT NOT NULL,
cipher char(64),
rootKey char(64),
simplePW blob
);

CREATE TABLE account (
aKey integer PRIMARY KEY AUTOINCREMENT NOT ... the cDatabaseStructure of this stack into tSQL
put revOpenDatabase("sqlite", tPath,"binary") into tDatabaseID
revExecuteSQL tDatabaseID, tSQL ...
by bogs
Fri Feb 21, 2020 11:45 am
Forum: Windows
Topic: Save main stack SQLite
Replies: 7
Views: 8419

Re: Save main stack SQLite

... sure I understand the question fully, so pardon my ignorance.

While a blob in sqlite is generally there for storage of binary data, sqlite itself is a single user accessed db, normally used for local storage. Right off the top, that would prevent multiple users from doing anything with (a single ...
by SkinnyKenny
Fri Feb 21, 2020 10:38 am
Forum: Windows
Topic: Save main stack SQLite
Replies: 7
Views: 8419

Save main stack SQLite

... if it was possible to save the current state of a main stack into a "Blob" container using SQLite. What I am trying to accomplish is keeping the data up to date in my main stack when multiple users across multiple user profiles on Windows are accessing the program. I assume that as long as I create ...
by bogs
Mon May 20, 2019 4:50 pm
Forum: Databases
Topic: Looking for example of linked image sqlite DB
Replies: 4
Views: 7526

Re: Looking for example of linked image sqlite DB


If I have 300 to 500 electronic parts in an sqlite LiveCode desktop application, would putting 1 to 5 small images (perhaps no more than 60 Kb each in ... that storing the images would be as binary files.

Well, as a blob, but not necessarily as binary. I believe the recommended way would be to ...