[Zope] inserting file into external db

Jason Byron jason_zope@yahoo.com
Thu, 14 Jun 2001 10:41:02 -0700 (PDT)


> And the SQL to insert the file into the MySQL db (takes
> argument
> doc_file, DOC_ID is set to 'auto increment'):
> insert into TABLE
> (DOC_ID, 
> DOC_FILE)
> values
> ('0', 
> <dtml-sqlvar doc_file type=nb>)
> 
> The file is showing up, but it's being munged at some point.
> Hopefully
> this is as simple as uuencoding the file or somesuch, but I
> can't
> figure out to get Zope to do that.
>

looks good, maybe the database field is not a blob?

also, you might want <dtml-sqlvar doc_file type=nb optional>
in case nothing is sent.


__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/