First of all, what do you mean by "attach to DB"? Do you mean to save it in a blob field in a row of a database table? You can do that with the Blob functions in PB, though I don't think I've done it personally so I can't tell you the details. But the docs should cover it.
There's a topic "Using OLE Columns in a DataWindow Object" in the HTML Books. I found it in the Index, under "blob data, creating columns for". I'm not sure that's exactly what you want, but it might work for you.
Another topic that might be helpful from the HTML Books is "About using OLE in DataWindow Objects".
Of the developers who could have put BLOBs in their database, they decided NOT to do it for the following reasons:
1) this bloats the database, making transport, backup and retrieval lengthy or impractical.
2) to create the BLOB you must save it to disk to read it into the BLOB, so it is already stored, and can already be used by other software, too.