store sound in databse (Urgent) [message #137247] |
Wed, 14 September 2005 01:51  |
esmat_shoja
Messages: 8 Registered: August 2005
|
Junior Member |
|
|
Please help me.
How can i store and retrieve wave files (sound) in my table through form 6i.
also i cant play sound Item in my form
my code is:
read_sound_file('filename', 'WAVE', 'sound_item_name');
go_item('sound_item_name');
play_sound('sound_item_name');
At runtime it closes my form without any sound !
|
|
|
|
|
|
|
Re: store sound in databse (Urgent) [message #137840 is a reply to message #137247] |
Sat, 17 September 2005 09:35   |
 |
saadatahmad
Messages: 452 Registered: March 2005 Location: Germany/Paderborn
|
Senior Member |

|
|
ok.....here we go like this
Create a table first.
saadat@anba> CREATE TABLE test
2 (a VARCHAr2(32),
3 b LONG RAW);
Table created.
Elapsed: 00:00:00.05
Now open form builder and create a new form for this table.
copy the chimes.wav file from c:\windows\media to c:\
(On windows 2000, it may be on a different location.
Write this code on When-New-Form-Instance trigger:
Go_Item('test.b');
Read_Sound_File('c:\chimes.wav', 'WAVE', 'test.b');
Play_Sound('test.b');
Run the form and you'll hear the sound. Now Click on Save button on toolbar.
Write anything in your "a" field. may be the description of the sound.
Now your wave file is stored in the database. Just query your form and you'll find the play button for the sound item is enabled. Just click the button and you can hear the sound which is now stored in the database.
If you still get any problem, you can write back.
Regards.
[Updated on: Sat, 17 September 2005 09:36] Report message to a moderator
|
|
|
|