Home » Developer & Programmer » Forms » store sound in databse (Urgent)
store sound in databse (Urgent) [message #137247] Wed, 14 September 2005 01:51 Go to next message
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 #137363 is a reply to message #137247] Wed, 14 September 2005 17:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
First off - I don't know. BUT, I would expect that storing your wave files has more to do with your database version that whether you use 6i or later. Oracle DB 10g, 9i, and maybe 8i, can store files - use the documentation link in the sticky and search for 'filename'. Alternatively, store them as 'blob' fields - search this forum for 'blob', 'clob', and maybe 'long'.

Are you running 3-tier? Is the sound file trying to run on the server? An idea only, sorry.

David
Re: store sound in databse (Urgent) [message #137370 is a reply to message #137363] Wed, 14 September 2005 22:35 Go to previous messageGo to next message
esmat_shoja
Messages: 8
Registered: August 2005
Junior Member
hi
i use oracle 9i client/server
and i created a table with blob column
but i don't know how to use it in my form .
thanks
Re: store sound in databse (Urgent) [message #137377 is a reply to message #137370] Thu, 15 September 2005 00:31 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I don't think there is such a thing as Forms 9i C/S, are you sure you don't mean Forms 6i C/S accessing an Oracle 9i database?

David
Re: store sound in databse (Urgent) [message #137812 is a reply to message #137377] Fri, 16 September 2005 23:37 Go to previous messageGo to next message
esmat_shoja
Messages: 8
Registered: August 2005
Junior Member
yes i mean
oracle databse 9i
client/server
form builder 6i
os: win2000 advance server.
Re: store sound in databse (Urgent) [message #137840 is a reply to message #137247] Sat, 17 September 2005 09:35 Go to previous messageGo to next message
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

Re: store sound in databse (Urgent) [message #362323 is a reply to message #137840] Mon, 01 December 2008 15:30 Go to previous message
hamadh
Messages: 11
Registered: October 2007
Junior Member
thank u;
commit;
Previous Topic: what is propery class
Next Topic: NLS_NUMERIC_CHARACTERS
Goto Forum:
  


Current Time: Thu Apr 18 17:50:42 CDT 2024