Board index » delphi » Trouble storing WAV files in BLOBs

Trouble storing WAV files in BLOBs

Hi,

I am having trouble storing a wav file in a blob. The code compiles
OK, but I get a run time error. My code is

Table1['Sound'].LoadFromFile(FileName);

And of course, the blob field is named "Sound" in the database, and
the filename is correct.

The runtime error I get is
"EVariantError with the message 'Variant Method Calls Not Supported' "

Can anyone help?

 

Re:Trouble storing WAV files in BLOBs


Quote
Tiberius wrote in message <3557ed6b.6273...@sd.znet.com>...
>Hi,

>I am having trouble storing a wav file in a blob. The code compiles
>OK, but I get a run time error. My code is

>Table1['Sound'].LoadFromFile(FileName);

Table1['Sound'] is a variant, try creating a persistent field, which will be
called table1sound, and will be a TBlobfield.  This will support the
LoadFromFile() call.  Thus:-

Table1sound.loadfromfile(filename);

HTH

Quote

>And of course, the blob field is named "Sound" in the database, and
>the filename is correct.

>The runtime error I get is
>"EVariantError with the message 'Variant Method Calls Not Supported' "

>Can anyone help?

Re:Trouble storing WAV files in BLOBs


On Fri, 15 May 1998 10:58:55 +0100, "Stuart Clennett"

Quote
<sclenn...@telemarque.karoo.co.uk> wrote:

>Tiberius wrote in message <3557ed6b.6273...@sd.znet.com>...
>>Hi,

>>I am having trouble storing a wav file in a blob. The code compiles
>>OK, but I get a run time error. My code is

>>Table1['Sound'].LoadFromFile(FileName);

>Table1['Sound'] is a variant, try creating a persistent field, which will be
>called table1sound, and will be a TBlobfield.  This will support the
>LoadFromFile() call.  Thus:-

>Table1sound.loadfromfile(filename);

Yes, that worked. Thanks!

Other Threads