[web2py] Re: blob type crop data

2015-07-09 Thread Viktor Boiarchuk
Thank you for clarification Niphlod !

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: blob type crop data

2015-06-14 Thread Niphlod
you're correct. web2py handles blob types and 'upload' Fields in its own 
way. You'd have to resort to either a full migration to another table or to 
access the data using raw sql statements.

On Saturday, June 13, 2015 at 5:20:06 AM UTC+2, Viktor Boiarchuk wrote:

 Hello everybody!
 Nice to meet so excellent community.

 My problem is next. I'm trying to use web2py with *external* sqlite 
 database formed by another program. One of the column of those database 
 consists of binary data of pdf docs. So I defined that field in model 
 *Field('pdf_binary','blob')*. I'm using SQLFORM.grid to modify my table 
 (not blob column). When I submit changes they are accepted but data in 
 'pdf_binary' become corrupted (it seems it has just begging of file data).

 Moreover when I try to extract binary data from blob field I also get just 
 part of data, but when I change field type to 'text' for e.g. ,
 *Field('pdf_binary','text')* I can extract normal data, but in this case 
 I get the query contains a null character error when i try to submit 
 changes in SQLFORM.
 I can't use upload field, because my binaries was made by another program 
 and it also raises errors when updating db.
 It seems that blob type is right choice for my aims, but it doesn't worked 
 I predicted.

 I will be thankful for all advices.
 Regard
 Viktor


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.