开发者

Titanium.DB read Blob from SQLite

开发者 https://www.devze.com 2023-03-02 10:21 出处:网络
I\'m developing with SDK 1.6.2 I execute a query using the following SQL var dbrows = db.execute(\'select item_logo , item_id,item_title,item_contentfrom item\');

I'm developing with SDK 1.6.2

I execute a query using the following SQL

var dbrows = db.execute('select item_logo , item_id,item_title,item_content from item');

I successfully get the values for item_id , item_title & item_content. However Ti.API.Info(getFieldByName('item_logo') returns a null value. I have the blob data in SQLLite ITEM table and it is a valid jpeg picture.

Is there any specific processing to be done at Titanium E开发者_如何学Cnd (Code) to read the Blob data in a loop? Can't find any specific info @ Titanium API docs.

Thanks Vishnoo


you can do this, but the recommended approach is to store the blob as a file and keep the native file path in the database.

See this response from Appcelerator

http://developer.appcelerator.com/question/97041/imageview-sqlite-blob-example-not-working

0

精彩评论

暂无评论...
验证码 换一张
取 消