Nico de Groot and Raul Monares, thank you! I tested loading files less 64kb 
and thats files was loaded. On my work we will use folder "uploads" for 
store files.
But I don't understan why operation INSERT is working not in all cases.
There are two tables 'test' and 'bin_files'. Both tables have generators 
and triggers. When I trying insert somthing in 'test' I have error.
*Error snapshot*
<class 'fdb.fbcore.DatabaseError'>(('Error while preparing SQL 
statement:\n- SQLCODE: -104\n- invalid request BLR at offset 46\n- 
generator GENID_TEST is not defined', -104, 335544343))
*Function argument list*

(self=<fdb.fbcore.PreparedStatement object>, operation='SELECT 
gen_id(genid_test, 0) FROM rdb$database', cursor=<fdb.fbcore.Cursor 
object>, internal=True)
tables.py
db_xml.define_table('test',
                Field('id', 'integer'),
                Field('XYZ'),
                Field('IOP'),
                primarykey=['id'],
                migrate=False
)
db_xml.define_table('bin_files',
                    Field('id','integer'),
                    Field('PARENT'),
                    Field('SRC_FILENAME'),
                    Field('DATA', 'blob'),
                    primarykey=['id','PARENT'],
                    migrate=False
)
default.py
db_xml.test.insert(XYZ='fzxf', IOP='dfsds')
After that:
db_xml.executesql("""INSERT INTO test (XYZ,IOP) VALUES 
('{0}','{1}')""".format('string1', 'string2'))
I see in database string1 and string2.
When I insert something in 'bin_files' all OK.

<https://lh3.googleusercontent.com/-xkLTtMU0mk4/Wvqc9SXuPbI/AAAAAAAAAI8/XK2IvmmeZZIrUfg5OOYwjgC4EyMyyH6vACLcBGAs/s1600/2.png>

<https://lh3.googleusercontent.com/-kD-SOdfap1I/Wvqc3Vz37eI/AAAAAAAAAI4/aeo0fHpjWI4miNqty6eWN4NI9M7gYCpdwCLcBGAs/s1600/1.png>

-- 
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.

Reply via email to