Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 process many image files and wav files

Author  Topic 

tim123
Starting Member

6 Posts

Posted - 2005-12-11 : 20:35:37
I need to write codes to access many image files and wave files and display them on the webpage. Both of these files are stored on the server (as many experts in this forum adviced) and their locations are in the SQL server database. About the wav files, I think I will have to convert them to MP3 first for fast delivery on internet. Since I am a newbie, any help would be appreciated.
Thanks,

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-12-11 : 23:06:09
What do you mean about on the server AND in the SQL Server database? You placed the .wav files in the database? Or, they are on the file server and you have a link to them in the database? You don't necessarily have to convert them to MP3 for fast delivery. How are you wanting these files displayed on the webpage? Is this for streaming media? Are you wanting someone to be able to click and download? Is it an embedded part of the webpage? Image and wave files are completely different also.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-12 : 00:35:34
>>and their locations are in the SQL server database

Then get file location from Database table and display them in your Presentation layer

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-12-12 : 00:46:43
I can't read Madhivan. Sorry Tim.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

tim123
Starting Member

6 Posts

Posted - 2005-12-12 : 10:05:48
Thanks, guys for reply.
Derrick, you are opening many questions that are needed to consider in this issue. Thank you. Sorry I did not state the issue cleary in my post. I mean I'd like to save .rtf (yes, rtf not image but they can be coded the same, I think) and .wav files on the web server (i.e., C:\inetpub\wwwroot\MyTestWebsite\*.rtf and *.wav). In the SQL sever database, I will create a table that has a field that stores the filenames (w/o extension). The ASP program will use a recordset to find the file name(s) and will search that file(s) on the web server and display them on the web browser. This program is not for downloading. It likes a multiple-choice test online that a student would take for an exam. The difference is I have to use the documents that are already saved as rtf files and the .wav files. I don't know how to bring these files on the internet using ASP. Any help would be greatly appricated.
Madhivan: What do you mean Presentation layer? How can I use it?

Thank you,

Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-12 : 12:35:30
sounds to me you are on the right path, saving the relative path in your tables

By the way this question should have been for the asp section

Use your relative path as /images/<%recordset_name%>.rtf

however the web page would prompt for a download of this file. The *.wav file should be place in a place holder

IF the browser doesnt support it, it woudl prompt to download it as well

:-)

The only way you coudl put them online using asp is to use either .jpg, png or gif files

for the audio/video you need to stream them as Derrick said above. Read his advice again

Afrika
Go to Top of Page

tim123
Starting Member

6 Posts

Posted - 2005-12-12 : 22:47:23
Hi Afrika,
>>>Use your relative path as /images/<%recordset_name%>.rtf. However the web page would prompt for a download of this file.
-Really? Do you know any way to prevent the prompt from appear? Of course, I never want poeple to download the tests.

>>>The *.wav file should be place in a place holder. IF the browser doesnt support it, it woudl prompt to download it as well.
-Can you please tell me more details about placing the wav files into the place holder? And what can I do to prevent downloading.

>>>For the audio/video you need to stream them as Derrick said above. Read his advice again
-It's not very clear to me. Can you tell me more about it?
Thank you,
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-13 : 00:03:39
>>Madhivan: What do you mean Presentation layer? How can I use it?

I meant Front End Applications like ASP, VB6,etc

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-13 : 05:55:52
quote:
Originally posted by tim123

Hi Afrika,
>>>Use your relative path as /images/<%recordset_name%>.rtf. However the web page would prompt for a download of this file.
-Really? Do you know any way to prevent the prompt from appear? Of course, I never want poeple to download the tests.

>>>The *.wav file should be place in a place holder. IF the browser doesnt support it, it woudl prompt to download it as well.
-Can you please tell me more details about placing the wav files into the place holder? And what can I do to prevent downloading.

>>>For the audio/video you need to stream them as Derrick said above. Read his advice again
-It's not very clear to me. Can you tell me more about it?
Thank you,




its quite simple.

web pages are simply text files, they allow certain files to be embedded.

*.rtf files are not one of them, so it wud prompt for a download

video/media files would have to stream, cos of bandwidth considerations. Anyone browsing your site would make a request, which is done via push on your server bit by bit. thats what streaming media is about

hope this helps

anymore questions ????
Go to Top of Page

tim123
Starting Member

6 Posts

Posted - 2005-12-13 : 10:49:27
Yes Afrika,
Do you have any way to help me to keep the users from downloading the test in case I must use rtf files? And what is the way to load the rtf file to the browser and the wav file is run accordingly, i.e., the pair rtf file and wav file?
Thanks
Go to Top of Page

tim123
Starting Member

6 Posts

Posted - 2005-12-13 : 15:46:48
I have another question. Since rtf files cause so many troubles, i.e., allow the users to download, slow loading, incompatible with other browser, and so on. Do you think I should convert them to JPEG files to embeb them into HTML? There is a program to convert rtf files to JPEG.
Thank you.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-14 : 05:10:12
quote:
Originally posted by tim123

Yes Afrika,
Do you have any way to help me to keep the users from downloading the test in case I must use rtf files? And what is the way to load the rtf file to the browser and the wav file is run accordingly, i.e., the pair rtf file and wav file?
Thanks



there is a way of incorporating rtf files into a web page. like yahoo rtf mail, I used to have such a script, but not sure, its in my library somewhere.

do a search on rtf and html pages

about the second question. I dont know how to convert to mp3 files, do a search.

Multimedia: Not my area, sorry. But i know the best way to go is streaming media.

storing on the server and locations in your db is the best way to go, read about BLOBs in sql server. storing images directly in your db is a bad design

afrika
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-14 : 14:46:15
Did this help ?

for rtf in web pages seehttp://www.softforall.com/WebAuthoring/HTMLTools/RTF-2-HTML10010051_ScreenShot.htm


http://www.devdirect.com/ALL/DCONV_PCAT_1879.aspx

http://www.easybyte.com/products/rtf2html.html


http://www.freedownloadscenter.com/Best/asp-html-time().html


http://www.textcontrol.com/applications/wwwwp/

for streamming media? Google remains our friend(s)


smile :-)

Afrika
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2005-12-15 : 03:51:50
This is not really a sql server question, it's an ASP question. You'll get more definitive answers from an ASP focused board.

To look at one bit of it though -

quote:

There is a program to convert rtf files to JPEG



How about just not saving them as rtf in the first place?

-------
Moo. :)
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2005-12-15 : 06:57:59
quote:
Originally posted by mr_mist

This is not really a sql server question, it's an ASP question. You'll get more definitive answers from an ASP focused board.

To look at one bit of it though -

quote:

There is a program to convert rtf files to JPEG



How about just not saving them as rtf in the first place?

-------
Moo. :)



yes, tahts what i said in my first post, it should be in asp section, however it has one or two areas related to sql server

Go to Top of Page
   

- Advertisement -