Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

help£¡SQLiteÖвÙ×÷blobÀàÐ͵Ä×ֶεÄÎÊÌâ

ÕâÊÇÎҲ鵽µÄ×ÊÁÏ
http://www.cppprog.com/2009/0108/43.html ÒѾ­´æ½øͼƬÁË£¬ÏÖÔÚ×öµ½ÕâÒ»²½ÁË£¬
¡°ÕâʱÊý¾Ý¿âµ±ÖÐÒѾ­ÓÐÁËÒ»Ìõ°üº¬BLOB×ֶεÄÊý¾Ý¡£½ÓÏÂÀ´ÎÒÃÇÒª¶ÁÈ¡ÕâÌõÊý¾Ý£º  1.  //Ñ¡È¡¸ÃÌõÊý¾Ý
  2. sqlite3_prepare(db, "select * from list;", -1, &stat, 0);
  3. sqlite3_step(stat);
  4. //µÃµ½¼Í¼ÖеÄBLOB×Ö¶Î
  5. const void * test = sqlite3_column_blob(stat, 1);
  6. //µÃµ½×Ö¶ÎÖÐÊý¾ÝµÄ³¤¶È
  7. int size = sqlite3_column_bytes(stat, 1);
  8. //¿½±´¸Ã×Ö¶Î
  9. sprintf(buffer2, "%s", test);¡±
ÇëÎÊ ±àÒëµÄʱºò ×îºóµÄbuffer2䶨Ò壬ÓдíÎó£¬ÎÒÓ¦¸ÃÈçºÎÐ޸ģ¿ÎÒÏë°ÑͼƬÏÔʾ³öÀ´£¬Ó¦¸ÃÏÔʾµ½Ê²Ã´¿Ø¼þÖÐÂð£¿Ó¦¸ÃÔõôÏÔʾ³öÀ´°¡£¿

´ó¼Ò°ïæ¿´¿´£¡¸Ð¼¤°¡£¡£¡ÎÊÌâ½â¾ö¿ÉÒÔ¼Ó ·Ö~~
»¹ÊÇÕâ¸öÎÊÌâÓ¦¸Ã·¢µ½±ðµÄʲô°æ£¿


ÒýÓÃ
buffer2 Ϊ¶¨Ò壬ÐèÒªÏȶ¨Òå¡£

buffer2 Ó¦¸ÃÊÇÒ»¸ö×Ö·ûÖ¸ÕëÀàÐ͵ÄÒ»¸öÄÚ´æÇøÓò£¬¿ÉÒÔʹÓÃÊý×飬»òÕßmollocÒ»¿éÄÚ´æ¡£

ÕâÐèÒª¿´ÄãËù¶ÁÈ¡µÄ×Ö·û´®µÄ³¤¶È¶ø¶¨¡£

ÀýÈ磺

char buffer2[100];
»ò
char * buffer2;
buffer2 = (char *)molloc(100);

ÎÒÕâÀï¼ÙÉè×î´ó³¤¶ÈÊÇ100


ÁíÍâÒ»¸öÒÉÎÊ£¬Êý¾Ý¿âÀï´æµÄÊÇͼƬµÄurl»¹ÊÇͼƬÊý¾Ý£¿
Èç¹ûÊÇͼƬ·¾¶£¬ÄÇÄã¿ÉÒÔÓÃÉÏÃæµÄ·½·¨¶ÁÈ¡£¬µ«»¹µÃÄã×Ô¼ºÈ¥ÏÂÔØͼƬ²¢ÏÔʾ¡£

Èç¹ûÊÇͼƬÊý¾Ý£¬ÄÇÄãÉÏÃæµÚ9ÐеIJÙ×÷ºÃÏñ²»Ì«¶Ô


Ïà¹ØÎÊ´ð£º

sqliteÖ®Database is lockedÎÊÌâ

»·¾³£ºQNX 6.3.2
°æ±¾£ºSQLite 2.7.3
ÏÖÏó£ºÔÚÃüÁîÐÐÏÂsqlite½øÈ¥£¬Ö´ÐÐ.table¡¢pragmaÖ®Àà¡¢select¶¼Ìáʾ
 database is locked
Ææ¹ÖµÄÊÇ£¬¼´Ê¹ÊÇд´½¨Ò»¸öÊý¾Ý¿â£¬Ö´ÐÐÉÏÊöÃüÁîÒ²ÊÇÄÇÑù¡£
Áí£ºÔÚһ̨Íê ......

Çë½ÌʹÓÃTree¿Ø¼þºÍSQLiteÊý¾Ý¿âµÄÎÊÌâ

ÎÒÏëÒª½«sqliteÊý¾Ý¿âÖеÄÊý¾Ý£¬ÒÔÊ÷¿Ø¼þµÄÐÎʽ¶Á³ö£¬²¢ÇÒÏÔʾÔÚ¶Ô»°¿òÉÏÃ棬²»ÖªµÀÔõô×ö£¬À´Çë½Ìһϡ£
ps£º¿´µ½ÓÐʹÓÃÊ÷¿Ø¼þºÍaccessµÄ£¬ÀïÃæÓÐÊý¾Ý¿âÒýÇæÀ´Á¬½ÓÊý¾Ý¿âºÍ³ÌÐò£¬ÎÒ²»ÖªµÀSQLiteÈçºÎÓë³ÌÐòÁ¬½ÓÆð ......

sqliteÒÆÖ²wince

ÎÒÏëÔÚpdaÉÏÓÃSQLiteÊý¾Ý¿â£¬ÎÒ³ÌÐòÊÇqtдµÄ£¬µ«ÊÇÎÒÓ¦¸ÃÔõÑù½«SQLiteÒÆÖ²µ½winceƽ̨ÉÏÄØ£¬ÎÒÏÖÔÚÓÐÁËSQLite.dllºÍSQLite.lib£¬Ö®ºóÎÒ½»²æ±àÒëÉú³ÉÁË.exeÎļþ£¬ÎªÊ²Ã´ÔÚÄ£ÄâÆ÷Éϲ»ÄÜÔËÐÐÄØ£¿
ÆÚ´ýןßÊֻشð£¬Ð»Ð» ......

¹ØÓÚsqliteµÄÎÊÌâ

ÎÒ°²×°ÁËÒ»¸ösqlite developer,Ò»¸ö¿ÉÊÓ»¯µÄ¹¤¾ß¡£
½Ó×Å£¬ÎÒÓÖ°²×°ÁËSQLite.NET,²¢ÔÚVSÀïÃæÌí¼ÓºÃÁËdll¡£
ÏÖÔÚ£¬ÎÒÔÚsqlite developerÀï´´½¨ÁËÒ»¸öÊý¾Ý¿â£¬¿âÖаüº¬ÎÒ×Ô¼º¶¨ÒåµÄÒ»ÕÅ±í¡£

ÎÊÌ⣺ÈçºÎÊ¹Ó ......

sqlite Îȶ¨,²¢·¢ÔõôÑù - .NET¼¼Êõ / ASP.NET

ÏÖÔÚÏë×öÒ»¸ö½øÏú´æ,¿ÉÄÜ»áÓÐ20ÈËͬʱһÆðÓÃ
²»ÖªµÀµ½ÊÇÑ¡Ôñ sqlite »¹ÊÇ access
´ó¼Ò¸ø¸øÒâ¼û°É
»¹ÊÇÓÃaccess°É£¬ÒòΪÄã¿Ï¶¨ÊÇÓÃ.net¿ª·¢£¬³öÁËʲôÎÊÌâµÄ»°ºÃ½â¾öһЩ¡£
Èç¹ûÓÃsqlite×ÊÁÏÏà¶Ô±È½ÏÉÙ¡£
²»¹ýÌý ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ