Home » U++ Library support » U++ SQL » How to use Sqlite BLOB type in U++ schema files?
|
Re: How to use Sqlite BLOB type in U++ schema files? [message #38756 is a reply to message #38755] |
Sun, 13 January 2013 22:25   |
omari
Messages: 276 Registered: March 2010
|
Experienced Member |
|
|
Hi,
BLOB is used like String.
for example:
TABLE_ (MYTABLE)
INT_ (ID) PRIMARY_KEY AUTO_INCREMENT
STRING_ (NAME,100)
BLOB_ (MYBLOB)
END_TABLE
bool Add(String name, String data)
{
Sqlite3Session sqlite3;
sqlite3.LogErrors(true);
if(!sqlite3.Open(db)) {
LOG("Can't create or open database file\n");
return false;
}
Sql sql = sqlite3;
S_MYTABLE row;
row.NAME = n;
row.MYBLOB = data;
sql*Insert(MYTABLE)(row);
return true;
}
Regards,
omari
regards
omari.
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 20:55:51 CEST 2025
Total time taken to generate the page: 0.02329 seconds
|