<< Click to Display Table of Contents >>

Navigation:  TCC > Variables & Functions > Functions >


@UNQKVF[[u,]filename,"key","value"] : Add a key / file value pair to a UnQlite database.


uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened with @UNQOPEN
keyKey to add or replace
filenameStore the contents of the file filename in the value
lengthLength (in bytes) to write (or -1 for the entire file)


The maximum file size is dependent on the amount of RAM and disk space available.


Returns 0 if successful, or the error text if not.




This example opens a database named "test.db", writes a key/file to the database, and then reads it back, saving it in a new file.


echo Testing file write and read

echo %@unqopen[rwc,test.db]

echo %@unqkvf[test.db,"aaa",ansi.cmd]

echo %@unqreadf[test.db,"aaa",newansi.cmd]

echo %@unqclose[test.db]