realbasic-plugins
[Top] [All Lists]

Re: newbie question - how to store a file from the disk in the database

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: newbie question - how to store a file from the disk in the database
From: Hans-Georg <pantarei at mac dot com>
Date: Wed, 26 Apr 2006 15:26:30 +0200
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <4E41F575-D0B3-49DD-A664-6F1DDEBEE3EB at gmail dot com>
Am 26.04.2006 um 14:45 schrieb Jeff Edwards:

If I need to store a file from the disk into a database blob, how do I do it?

Before Marco or Will will come by a first hint : A folderitem is a reference to the file but doesn't contain the content of this file. The blobcolumn of a databaserecord expects a string (and not a folderitem), in your case a string with the content of your file. So you have to read all the content probably in a memoryblock and then store the stringvalue in the blobcolumn. And I guess there is lot to think about when storing a file (restoring creation/mod. date, type ,creatot etc)

Hans-Georg

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>