Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 266
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.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: What do I need to download / configure to use MySql with U++?
Next Topic: How to view immediately the primary key in SqlArray
Goto Forum:
  


Current Time: Fri May 10 02:28:29 CEST 2024

Total time taken to generate the page: 0.02182 seconds