Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I had some processing code to detect the faces using opencv and c++ console application .its work nicely and capured images save on project folder.now i want save that images on local sql data base . How i do it. That local database also in my project folder.
Thank you

What I have tried:

i tried sqlite. But below example always says connection successful even database deletefrom the souse folder. Its seem not work.
C++
#include <stdio.h>
#include <sqlite3.h>
int main ( int argc , char * argv [])
{
   sqlite3 * db ;
char * zErrMsg = 0 ;
int rc ;
rc = sqlite3_open ( "test.db" , & db);
if ( rc ){
fprintf ( stderr , "Can't open database:
return ( 0 );
} else {
fprintf ( stderr , "Opened database succes
}
sqlite3_close ( db);
}
Posted
Updated 25-Dec-16 22:22pm
v2
Comments
Kornfeld Eliyahu Peter 25-Dec-16 3:31am    
SQLite has a data type BLOB (Binary Large OBject), use it!

1 solution

Take a look at this BLOB example of SQLite.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900