put flash swf file to sqlserver how to show it directly to IE

put flash swf file to sqlserver how to show it directly to IE

am 02.06.2005 05:46:21 von frank

I can put swf file to sqlserver into its image field, and get it out from
it. all by asp through IE.
then i want to show it directly to IE,I use the code as bellow:

codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.ca
b#version=6,0,29,0" width="32" height="32">
">

" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="232" height="132">


but i got negative result. after long time past, the flash swf was not
there.

Can anybody help me ?

thanks in advance!
Frank

Re: put flash swf file to sqlserver how to show it directly to IE

am 02.06.2005 06:29:12 von Adrienne

Gazing into my crystal ball I observed "frank" writing
in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:

> I can put swf file to sqlserver into its image field, and get it out from
> it. all by asp through IE.
> then i want to show it directly to IE,I use the code as bellow:
>
> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash
> .ca
> b#version=6,0,29,0" width="32" height="32">
> ">
>
> " quality="high"
> pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="232" height="132">
>

>
> but i got negative result. after long time past, the flash swf was not
> there.
>
> Can anybody help me ?
>
> thanks in advance!
> Frank
>
>
>

The ASP page has to process the querystring to get the correct movie from
the table and insert its value into the src.

<% id = request.querystring("id")

sql = "SELECT movie FROM table WHERE id = " & id
set rs = createobject("ADODB.Recordset")
rs.Open sql, yourconnectionstring

movie = trim(rs("movie"))
rs.Close
set rs = nothing
%>
codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash
..ca
b#version=6,0,29,0" width="32" height="32">


pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="232" height="132">


--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 02.06.2005 07:43:02 von frank

Thank you very much!
In my code,the showimg.asp is like this:
I dont know why can I get the swf file with the name as showimg.asp but
cannot show the swf file directly to IE.

<%
Dim id
id = trim(Request("id"))

strconn = "Driver={SQL Server};Description=sqldemo;SERVER=192.168.1.100;"
&"UID=sa;Password=Frank;DATABASE=webtest"
set conn = server.createobject("adodb.connection")
conn.open strconn
set rs_img=Server.Createobject("ADODB.Recordset")
'sql="select * from tbl_images where id='"&id&"'"
sql="select * from items where id ='"&id&"'"
rs_img.open sql,conn,1,3,1

Response.Expires = 0
Response.Buffer = TRUE
Response.Clear

Response.ContentType = "image/jpg"

Dim img_size
img_size = rs_img("image").ActualSize
Response.BinaryWrite rs_img("image").getChunk(img_size)
rs_img.close
set rs_img=nothing
%>


"Adrienne" дÈëÓʼþ
news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "frank"
writing
> in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
>
> > I can put swf file to sqlserver into its image field, and get it out
from
> > it. all by asp through IE.
> > then i want to show it directly to IE,I use the code as bellow:
> >
> > > >
codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash
> > .ca
> > b#version=6,0,29,0" width="32" height="32">
> > ">
> >
> > " quality="high"
> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> > type="application/x-shockwave-flash" width="232" height="132">
> >

> >
> > but i got negative result. after long time past, the flash swf was not
> > there.
> >
> > Can anybody help me ?
> >
> > thanks in advance!
> > Frank
> >
> >
> >
>
> The ASP page has to process the querystring to get the correct movie from
> the table and insert its value into the src.
>
> <% id = request.querystring("id")
>
> sql = "SELECT movie FROM table WHERE id = " & id
> set rs = createobject("ADODB.Recordset")
> rs.Open sql, yourconnectionstring
>
> movie = trim(rs("movie"))
> rs.Close
> set rs = nothing
> %>
> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash
> .ca
> b#version=6,0,29,0" width="32" height="32">
>
>
> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="232" height="132">
>

>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 02.06.2005 09:16:16 von Adrienne

Gazing into my crystal ball I observed "frank"
writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:

> Thank you very much!
> In my code,the showimg.asp is like this:
> I dont know why can I get the swf file with the name as showimg.asp but
> cannot show the swf file directly to IE.
>
><%
> Dim id
> id = trim(Request("id"))

Not a good idea to use Request("value"). The server has to look through
all possible collections (querystring, form, servervariables, cookies)
first until it finds the right one. Better:

if request.form("id") <> "" then
id = request.form("id")
elseif request.querystring("id") <> "" then
id = request.querystring("id")
elseif request.cookies("id") <> "" then
id = request.cookies("id")
end if

Change to suit where the value may be coming from.

>
> strconn = "Driver={SQL
> Server};Description=sqldemo;SERVER=192.168.1.100;"
> &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> server.createobject("adodb.connection") conn.open strconn
> set rs_img=Server.Createobject("ADODB.Recordset")
> 'sql="select * from tbl_images where id='"&id&"'"
> sql="select * from items where id ='"&id&"'"
> rs_img.open sql,conn,1,3,1

Not a good idea to use SELECT * - that selects ALL fields in your table.
If your table has many fields this can really affect performance.

>
> Response.Expires = 0
> Response.Buffer = TRUE
> Response.Clear
>
> Response.ContentType = "image/jpg"
>
> Dim img_size
> img_size = rs_img("image").ActualSize
> Response.BinaryWrite rs_img("image").getChunk(img_size)
> rs_img.close
> set rs_img=nothing
> %>
>

A jpg is not a swf file. The browser does not know what to do. You need
to tell the browser explicitly the name of the swf file. Look at my
example again.

>
> "Adrienne" дÈëÓʼþ
> news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
>> Gazing into my crystal ball I observed "frank"
>> writing in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
>>
>> > I can put swf file to sqlserver into its image field, and get it out
>> > from it. all by asp through IE.
>> > then i want to show it directly to IE,I use the code as bellow:
>> >
>> > >> >
> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
> h
>> > .ca
>> > b#version=6,0,29,0" width="32" height="32">
>> > ">
>> >
>> > " quality="high"
>> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> > type="application/x-shockwave-flash" width="232"
>> > height="132">

>> >
>> > but i got negative result. after long time past, the flash swf was
>> > not there.
>> >
>> > Can anybody help me ?
>> >
>> > thanks in advance!
>> > Frank
>> >
>> >
>> >
>>
>> The ASP page has to process the querystring to get the correct movie
>> from the table and insert its value into the src.
>>
>> <% id = request.querystring("id")
>>
>> sql = "SELECT movie FROM table WHERE id = " & id
>> set rs = createobject("ADODB.Recordset")
>> rs.Open sql, yourconnectionstring
>>
>> movie = trim(rs("movie"))
>> rs.Close
>> set rs = nothing %>
>> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swfla
>> sh .ca b#version=6,0,29,0" width="32" height="32">
>>
>>
>> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
>> type="application/x-shockwave-flash" width="232" height="132">
>>

>>
>> --
>> Adrienne Boswell
>> http://www.cavalcade-of-coding.info
>> Please respond to the group so others can share
>
>
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 07.06.2005 07:12:28 von frank

Thank you again!
but,I still cant show the flash file directly to IE.
1,with show.asp?id=1,I got nothing except the running of flag on the right
up conner of IE.
2,when I use http://192.168.1.100/show.asp?id=1 in the downloader
program(such as getright,flashget,netants...), I just got the source code of
show.asp
3,with my showimg.asp, http://192.168,1,100/showimg.asp?id=1 in the same
downloader program, I got the flash swf file, but the name was changed to
showimg.asp, I can change its name to showimg.asp.swf and show it by drag it
to IE.But I cant let it show dirctly in IE.

ref. source code as belloww:

show.asp:
<% id = request.querystring("id")
strconn = "Driver={SQL Server};Description=sqldemo;SERVER=192.168.1.100;"
&"UID=sa;Password=Frank;DATABASE=webtest"
set conn = server.createobject("adodb.connection")
conn.open strconn
sql = "SELECT image FROM items WHERE id = " & id
set rs = createobject("ADODB.Recordset")
rs.Open sql, conn,1,3,1

movie = trim(rs("image"))
rs.Close
set rs = nothing
%>
codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.ca
b#version=6,0,29,0" width="32" height="32">


pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="232" height="132">






my showimg.asp :


<%
Dim id
id = trim(Request.QueryString("id"))

strconn = "Driver={SQL Server};Description=sqldemo;SERVER=192.168.1.100;"
&"UID=sa;Password=Frank;DATABASE=webtest"
set conn = server.createobject("adodb.connection")
conn.open strconn
set rs_img=Server.Createobject("ADODB.Recordset")
'sql="select * from tbl_images where id='"&id&"'"
sql="select * from items where id ='"&id&"'"
rs_img.open sql,conn,1,3,1
%>



<%

Response.Expires = 0
Response.Buffer = TRUE
Response.Clear

Response.ContentType = "application/x-shockwave-flash"

Dim img_size
img_size = rs_img("image").ActualSize
Response.BinaryWrite rs_img("image").getChunk(img_size)
rs_img.close
set rs_img=nothing
%>




"Adrienne" дÈëÓʼþ
news:Xns96692C24A40Earbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "frank"
> writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:
>
> > Thank you very much!
> > In my code,the showimg.asp is like this:
> > I dont know why can I get the swf file with the name as showimg.asp but
> > cannot show the swf file directly to IE.
> >
> ><%
> > Dim id
> > id = trim(Request("id"))
>
> Not a good idea to use Request("value"). The server has to look through
> all possible collections (querystring, form, servervariables, cookies)
> first until it finds the right one. Better:
>
> if request.form("id") <> "" then
> id = request.form("id")
> elseif request.querystring("id") <> "" then
> id = request.querystring("id")
> elseif request.cookies("id") <> "" then
> id = request.cookies("id")
> end if
>
> Change to suit where the value may be coming from.
>
> >
> > strconn = "Driver={SQL
> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> > server.createobject("adodb.connection") conn.open strconn
> > set rs_img=Server.Createobject("ADODB.Recordset")
> > 'sql="select * from tbl_images where id='"&id&"'"
> > sql="select * from items where id ='"&id&"'"
> > rs_img.open sql,conn,1,3,1
>
> Not a good idea to use SELECT * - that selects ALL fields in your table.
> If your table has many fields this can really affect performance.
>
> >
> > Response.Expires = 0
> > Response.Buffer = TRUE
> > Response.Clear
> >
> > Response.ContentType = "image/jpg"
> >
> > Dim img_size
> > img_size = rs_img("image").ActualSize
> > Response.BinaryWrite rs_img("image").getChunk(img_size)
> > rs_img.close
> > set rs_img=nothing
> > %>
> >
>
> A jpg is not a swf file. The browser does not know what to do. You need
> to tell the browser explicitly the name of the swf file. Look at my
> example again.
>
> >
> > "Adrienne" дÈëÓʼþ
> > news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
> >> Gazing into my crystal ball I observed "frank"
> >> writing in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
> >>
> >> > I can put swf file to sqlserver into its image field, and get it out
> >> > from it. all by asp through IE.
> >> > then i want to show it directly to IE,I use the code as bellow:
> >> >
> >> > > >> >
> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
> > h
> >> > .ca
> >> > b#version=6,0,29,0" width="32" height="32">
> >> > ">
> >> >
> >> > " quality="high"
> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> > type="application/x-shockwave-flash" width="232"
> >> > height="132">

> >> >
> >> > but i got negative result. after long time past, the flash swf was
> >> > not there.
> >> >
> >> > Can anybody help me ?
> >> >
> >> > thanks in advance!
> >> > Frank
> >> >
> >> >
> >> >
> >>
> >> The ASP page has to process the querystring to get the correct movie
> >> from the table and insert its value into the src.
> >>
> >> <% id = request.querystring("id")
> >>
> >> sql = "SELECT movie FROM table WHERE id = " & id
> >> set rs = createobject("ADODB.Recordset")
> >> rs.Open sql, yourconnectionstring
> >>
> >> movie = trim(rs("movie"))
> >> rs.Close
> >> set rs = nothing %>
> >> > >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swfla
> >> sh .ca b#version=6,0,29,0" width="32" height="32">
> >>
> >>
> >> > >> pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> type="application/x-shockwave-flash" width="232" height="132">
> >>

> >>
> >> --
> >> Adrienne Boswell
> >> http://www.cavalcade-of-coding.info
> >> Please respond to the group so others can share
> >
> >
> >
>
>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 07.06.2005 18:30:24 von Adrienne

Gazing into my crystal ball I observed "frank"
writing in news:ugWV$8xaFHA.3528@TK2MSFTNGP09.phx.gbl:

> Thank you again!
> but,I still cant show the flash file directly to IE.
> 1,with show.asp?id=1,I got nothing except the running of flag on the
> right up conner of IE.
> 2,when I use http://192.168.1.100/show.asp?id=1 in the downloader
> program(such as getright,flashget,netants...), I just got the source
> code of show.asp
> 3,with my showimg.asp, http://192.168,1,100/showimg.asp?id=1 in the
> same downloader program, I got the flash swf file, but the name was
> changed to showimg.asp, I can change its name to showimg.asp.swf and
> show it by drag it to IE.But I cant let it show dirctly in IE.

I don't think you understand what I'm talking about. This takes only one
page to accomplish:

<% dim id, flashtrue, imagetrue, swf, img
id = request.querystring("id") 'gets the id from the querystring

sql = "SELECT swf_path, img_path FROM table WHERE id = " & id
'selects only the path to the swf and image files from the table
set rs = createobject("ADODB.Recordset")
rs.Open sql, connectionstring

if not isnull(rs("swf_path")) and trim(rs("swf_path")) <> "" then
swf = trim(rs("swf_path"))
flashtrue = true
else
flashtrue = false
end if
if not isnull(rs("img_path")) and trim(rs("img_path")) <> "" then
img = trim(rs("img_path"))
imagetrue = true
else
imagetrue = false
end if

'now start building your HTML with accessibility in mind
if flashtrue then
%>
codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
h .ca
b#version=6,0,29,0" width="32" height="32">


<% if imagetrue then 'add this in case the users system has no flash%>

<% end if%>
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="232" height="132">

<%elseif not flashtrue and imagetrue%>

<%else%>

Some text to describe the flash or image


<%end if%>

The above script looks at the querystring coming from another page,
retrieves the paths to the swf and image files and inserts them into the
relative markup.

>
> ref. source code as belloww:
>
> show.asp:
><% id = request.querystring("id")
> strconn = "Driver={SQL
> Server};Description=sqldemo;SERVER=192.168.1.100;"
> &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> server.createobject("adodb.connection") conn.open strconn
> sql = "SELECT image FROM items WHERE id = " & id
> set rs = createobject("ADODB.Recordset")
> rs.Open sql, conn,1,3,1
>
> movie = trim(rs("image"))
> rs.Close
> set rs = nothing
> %>
> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
> h .ca
> b#version=6,0,29,0" width="32" height="32">
>
>
> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="232" height="132">
>

>
>
>
>
>
> my showimg.asp :
>
>
><%
> Dim id
> id = trim(Request.QueryString("id"))
>
> strconn = "Driver={SQL
> Server};Description=sqldemo;SERVER=192.168.1.100;"
> &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> server.createobject("adodb.connection") conn.open strconn
> set rs_img=Server.Createobject("ADODB.Recordset")
> 'sql="select * from tbl_images where id='"&id&"'"
> sql="select * from items where id ='"&id&"'"
> rs_img.open sql,conn,1,3,1
> %>
>
>
>
><%
>
> Response.Expires = 0
> Response.Buffer = TRUE
> Response.Clear
>
> Response.ContentType = "application/x-shockwave-flash"
>
> Dim img_size
> img_size = rs_img("image").ActualSize
> Response.BinaryWrite rs_img("image").getChunk(img_size)
> rs_img.close
> set rs_img=nothing
> %>
>
>
>
>
> "Adrienne" дÈëÓʼþ
> news:Xns96692C24A40Earbpenyahoocom@207.115.63.158...
>> Gazing into my crystal ball I observed "frank"
>> writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:
>>
>> > Thank you very much!
>> > In my code,the showimg.asp is like this:
>> > I dont know why can I get the swf file with the name as showimg.asp
>> > but cannot show the swf file directly to IE.
>> >
>> ><%
>> > Dim id
>> > id = trim(Request("id"))
>>
>> Not a good idea to use Request("value"). The server has to look
>> through all possible collections (querystring, form, servervariables,
>> cookies) first until it finds the right one. Better:
>>
>> if request.form("id") <> "" then
>> id = request.form("id")
>> elseif request.querystring("id") <> "" then
>> id = request.querystring("id")
>> elseif request.cookies("id") <> "" then
>> id = request.cookies("id")
>> end if
>>
>> Change to suit where the value may be coming from.
>>
>> >
>> > strconn = "Driver={SQL
>> > Server};Description=sqldemo;SERVER=192.168.1.100;"
>> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
>> > server.createobject("adodb.connection") conn.open strconn
>> > set rs_img=Server.Createobject("ADODB.Recordset")
>> > 'sql="select * from tbl_images where id='"&id&"'"
>> > sql="select * from items where id ='"&id&"'" rs_img.open
>> > sql,conn,1,3,1
>>
>> Not a good idea to use SELECT * - that selects ALL fields in your
>> table. If your table has many fields this can really affect
>> performance.
>>
>> >
>> > Response.Expires = 0
>> > Response.Buffer = TRUE
>> > Response.Clear
>> >
>> > Response.ContentType = "image/jpg"
>> >
>> > Dim img_size
>> > img_size = rs_img("image").ActualSize
>> > Response.BinaryWrite rs_img("image").getChunk(img_size)
>> > rs_img.close
>> > set rs_img=nothing %>
>> >
>>
>> A jpg is not a swf file. The browser does not know what to do. You
>> need to tell the browser explicitly the name of the swf file. Look at
>> my example again.
>>
>> >
>> > "Adrienne" дÈëÓʼþ
>> > news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
>> >> Gazing into my crystal ball I observed "frank"
>> >> writing in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
>> >>
>> >> > I can put swf file to sqlserver into its image field, and get it
>> >> > out from it. all by asp through IE.
>> >> > then i want to show it directly to IE,I use the code as bellow:
>> >> >
>> >> > >> >> >
>> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swf
>> > las h
>> >> > .ca
>> >> > b#version=6,0,29,0" width="32" height="32">
>> >> > ">
>> >> >
>> >> > " quality="high"
>> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> > type="application/x-shockwave-flash" width="232"
>> >> > height="132">

>> >> >
>> >> > but i got negative result. after long time past, the flash swf
>> >> > was not there.
>> >> >
>> >> > Can anybody help me ?
>> >> >
>> >> > thanks in advance!
>> >> > Frank
>> >> >
>> >> >
>> >> >
>> >>
>> >> The ASP page has to process the querystring to get the correct
>> >> movie from the table and insert its value into the src.
>> >>
>> >> <% id = request.querystring("id")
>> >>
>> >> sql = "SELECT movie FROM table WHERE id = " & id
>> >> set rs = createobject("ADODB.Recordset")
>> >> rs.Open sql, yourconnectionstring
>> >>
>> >> movie = trim(rs("movie"))
>> >> rs.Close
>> >> set rs = nothing %>
>> >> >> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/sw
>> >> fla sh .ca b#version=6,0,29,0" width="32" height="32">
>> >>
>> >>
>> >> >> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> type="application/x-shockwave-flash" width="232"
>> >> height="132">

>> >>
>> >> --
>> >> Adrienne Boswell http://www.cavalcade-of-coding.info
>> >> Please respond to the group so others can share
>> >
>> >
>> >
>>
>>
>>
>> --
>> Adrienne Boswell
>> http://www.cavalcade-of-coding.info
>> Please respond to the group so others can share
>
>
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 08.06.2005 10:19:16 von frank

OH£¡ My god£¡We made some misunderstanding ther.
What I want is to store swf file to databese,not only the path and file
name, and get it back from the database, and show the swf file directly to
IE, not store it to disk as file again and then show it to IE.
the diagram is like:

swf - upload to server ->SQL Server(image field) --request by IE and get it
back from the field and send it to IE-->(not store to disk as swf file
again)Show it to IE.
I did not success at the last step.


"Adrienne" дÈëÓʼþ
news:Xns966E60B3DDD03arbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "frank"
> writing in news:ugWV$8xaFHA.3528@TK2MSFTNGP09.phx.gbl:
>
> > Thank you again!
> > but,I still cant show the flash file directly to IE.
> > 1,with show.asp?id=1,I got nothing except the running of flag on the
> > right up conner of IE.
> > 2,when I use http://192.168.1.100/show.asp?id=1 in the downloader
> > program(such as getright,flashget,netants...), I just got the source
> > code of show.asp
> > 3,with my showimg.asp, http://192.168,1,100/showimg.asp?id=1 in the
> > same downloader program, I got the flash swf file, but the name was
> > changed to showimg.asp, I can change its name to showimg.asp.swf and
> > show it by drag it to IE.But I cant let it show dirctly in IE.
>
> I don't think you understand what I'm talking about. This takes only one
> page to accomplish:
>
> <% dim id, flashtrue, imagetrue, swf, img
> id = request.querystring("id") 'gets the id from the querystring
>
> sql = "SELECT swf_path, img_path FROM table WHERE id = " & id
> 'selects only the path to the swf and image files from the table
> set rs = createobject("ADODB.Recordset")
> rs.Open sql, connectionstring
>
> if not isnull(rs("swf_path")) and trim(rs("swf_path")) <> "" then
> swf = trim(rs("swf_path"))
> flashtrue = true
> else
> flashtrue = false
> end if
> if not isnull(rs("img_path")) and trim(rs("img_path")) <> "" then
> img = trim(rs("img_path"))
> imagetrue = true
> else
> imagetrue = false
> end if
>
> 'now start building your HTML with accessibility in mind
> if flashtrue then
> %>
> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
> h .ca
> b#version=6,0,29,0" width="32" height="32">
>
>
> <% if imagetrue then 'add this in case the users system has no flash%>
>
> <% end if%>
> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> type="application/x-shockwave-flash" width="232" height="132">
>

> <%elseif not flashtrue and imagetrue%>
>
> <%else%>
>

Some text to describe the flash or image


> <%end if%>
>
> The above script looks at the querystring coming from another page,
> retrieves the paths to the swf and image files and inserts them into the
> relative markup.
>
> >
> > ref. source code as belloww:
> >
> > show.asp:
> ><% id = request.querystring("id")
> > strconn = "Driver={SQL
> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> > server.createobject("adodb.connection") conn.open strconn
> > sql = "SELECT image FROM items WHERE id = " & id
> > set rs = createobject("ADODB.Recordset")
> > rs.Open sql, conn,1,3,1
> >
> > movie = trim(rs("image"))
> > rs.Close
> > set rs = nothing
> > %>
> > > > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflas
> > h .ca
> > b#version=6,0,29,0" width="32" height="32">
> >
> >
> > > > pluginspage="http://www.macromedia.com/go/getflashplayer"
> > type="application/x-shockwave-flash" width="232" height="132">
> >

> >
> >
> >
> >
> >
> > my showimg.asp :
> >
> >
> ><%
> > Dim id
> > id = trim(Request.QueryString("id"))
> >
> > strconn = "Driver={SQL
> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> > server.createobject("adodb.connection") conn.open strconn
> > set rs_img=Server.Createobject("ADODB.Recordset")
> > 'sql="select * from tbl_images where id='"&id&"'"
> > sql="select * from items where id ='"&id&"'"
> > rs_img.open sql,conn,1,3,1
> > %>
> >
> >
> >
> ><%
> >
> > Response.Expires = 0
> > Response.Buffer = TRUE
> > Response.Clear
> >
> > Response.ContentType = "application/x-shockwave-flash"
> >
> > Dim img_size
> > img_size = rs_img("image").ActualSize
> > Response.BinaryWrite rs_img("image").getChunk(img_size)
> > rs_img.close
> > set rs_img=nothing
> > %>
> >
> >
> >
> >
> > "Adrienne" дÈëÓʼþ
> > news:Xns96692C24A40Earbpenyahoocom@207.115.63.158...
> >> Gazing into my crystal ball I observed "frank"
> >> writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:
> >>
> >> > Thank you very much!
> >> > In my code,the showimg.asp is like this:
> >> > I dont know why can I get the swf file with the name as showimg.asp
> >> > but cannot show the swf file directly to IE.
> >> >
> >> ><%
> >> > Dim id
> >> > id = trim(Request("id"))
> >>
> >> Not a good idea to use Request("value"). The server has to look
> >> through all possible collections (querystring, form, servervariables,
> >> cookies) first until it finds the right one. Better:
> >>
> >> if request.form("id") <> "" then
> >> id = request.form("id")
> >> elseif request.querystring("id") <> "" then
> >> id = request.querystring("id")
> >> elseif request.cookies("id") <> "" then
> >> id = request.cookies("id")
> >> end if
> >>
> >> Change to suit where the value may be coming from.
> >>
> >> >
> >> > strconn = "Driver={SQL
> >> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> >> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> >> > server.createobject("adodb.connection") conn.open strconn
> >> > set rs_img=Server.Createobject("ADODB.Recordset")
> >> > 'sql="select * from tbl_images where id='"&id&"'"
> >> > sql="select * from items where id ='"&id&"'" rs_img.open
> >> > sql,conn,1,3,1
> >>
> >> Not a good idea to use SELECT * - that selects ALL fields in your
> >> table. If your table has many fields this can really affect
> >> performance.
> >>
> >> >
> >> > Response.Expires = 0
> >> > Response.Buffer = TRUE
> >> > Response.Clear
> >> >
> >> > Response.ContentType = "image/jpg"
> >> >
> >> > Dim img_size
> >> > img_size = rs_img("image").ActualSize
> >> > Response.BinaryWrite rs_img("image").getChunk(img_size)
> >> > rs_img.close
> >> > set rs_img=nothing %>
> >> >
> >>
> >> A jpg is not a swf file. The browser does not know what to do. You
> >> need to tell the browser explicitly the name of the swf file. Look at
> >> my example again.
> >>
> >> >
> >> > "Adrienne" дÈëÓʼþ
> >> > news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
> >> >> Gazing into my crystal ball I observed "frank"
> >> >> writing in news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
> >> >>
> >> >> > I can put swf file to sqlserver into its image field, and get it
> >> >> > out from it. all by asp through IE.
> >> >> > then i want to show it directly to IE,I use the code as bellow:
> >> >> >
> >> >> > > >> >> >
> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swf
> >> > las h
> >> >> > .ca
> >> >> > b#version=6,0,29,0" width="32" height="32">
> >> >> > ">
> >> >> >
> >> >> > " quality="high"
> >> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> >> > type="application/x-shockwave-flash" width="232"
> >> >> > height="132">

> >> >> >
> >> >> > but i got negative result. after long time past, the flash swf
> >> >> > was not there.
> >> >> >
> >> >> > Can anybody help me ?
> >> >> >
> >> >> > thanks in advance!
> >> >> > Frank
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> The ASP page has to process the querystring to get the correct
> >> >> movie from the table and insert its value into the src.
> >> >>
> >> >> <% id = request.querystring("id")
> >> >>
> >> >> sql = "SELECT movie FROM table WHERE id = " & id
> >> >> set rs = createobject("ADODB.Recordset")
> >> >> rs.Open sql, yourconnectionstring
> >> >>
> >> >> movie = trim(rs("movie"))
> >> >> rs.Close
> >> >> set rs = nothing %>
> >> >> > >> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/sw
> >> >> fla sh .ca b#version=6,0,29,0" width="32" height="32">
> >> >>
> >> >>
> >> >> > >> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> >> type="application/x-shockwave-flash" width="232"
> >> >> height="132">

> >> >>
> >> >> --
> >> >> Adrienne Boswell http://www.cavalcade-of-coding.info
> >> >> Please respond to the group so others can share
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Adrienne Boswell
> >> http://www.cavalcade-of-coding.info
> >> Please respond to the group so others can share
> >
> >
> >
>
>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 09.06.2005 06:44:40 von Adrienne

Gazing into my crystal ball I observed "frank"
writing in news:#ZZFBKAbFHA.1384@TK2MSFTNGP09.phx.gbl:

> OH£¡ My god£¡We made some misunderstanding ther.
> What I want is to store swf file to databese,not only the path and file
> name, and get it back from the database, and show the swf file directly
> to IE, not store it to disk as file again and then show it to IE.
> the diagram is like:
>
> swf - upload to server ->SQL Server(image field) --request by IE and
> get it back from the field and send it to IE-->(not store to disk as
> swf file again)Show it to IE.
> I did not success at the last step.

Trust me on this, you are much better off storing the swf file to disk and
not the database. Storing to the database creates many issues:
1. Speed. It's faster to get the file from the disk than the DB
2. Data in BLOBs can get corrupted in a database and are less likely to get
corrupted on disk
3. It's easier to replace something on the disk. If the swf has changes,
then it has to be stored in the database again, causing valuable time.
4. Easier to port to another system.
5. Other reasons

Just store the path to the swf file and you will be a lot better off.

>
>
> "Adrienne" дÈëÓʼþ
> news:Xns966E60B3DDD03arbpenyahoocom@207.115.63.158...
>> Gazing into my crystal ball I observed "frank"
>> writing in news:ugWV$8xaFHA.3528@TK2MSFTNGP09.phx.gbl:
>>
>> > Thank you again!
>> > but,I still cant show the flash file directly to IE.
>> > 1,with show.asp?id=1,I got nothing except the running of flag on the
>> > right up conner of IE.
>> > 2,when I use http://192.168.1.100/show.asp?id=1 in the downloader
>> > program(such as getright,flashget,netants...), I just got the source
>> > code of show.asp
>> > 3,with my showimg.asp, http://192.168,1,100/showimg.asp?id=1 in the
>> > same downloader program, I got the flash swf file, but the name was
>> > changed to showimg.asp, I can change its name to showimg.asp.swf and
>> > show it by drag it to IE.But I cant let it show dirctly in IE.
>>
>> I don't think you understand what I'm talking about. This takes only
>> one page to accomplish:
>>
>> <% dim id, flashtrue, imagetrue, swf, img
>> id = request.querystring("id") 'gets the id from the querystring
>>
>> sql = "SELECT swf_path, img_path FROM table WHERE id = " & id
>> 'selects only the path to the swf and image files from the table
>> set rs = createobject("ADODB.Recordset")
>> rs.Open sql, connectionstring
>>
>> if not isnull(rs("swf_path")) and trim(rs("swf_path")) <> "" then
>> swf = trim(rs("swf_path"))
>> flashtrue = true else
>> flashtrue = false
>> end if
>> if not isnull(rs("img_path")) and trim(rs("img_path")) <> "" then
>> img = trim(rs("img_path"))
>> imagetrue = true else
>> imagetrue = false
>> end if
>>
>> 'now start building your HTML with accessibility in mind
>> if flashtrue then
>> %>
>> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swfla
>> s
>> h .ca
>> b#version=6,0,29,0" width="32" height="32">
>>
>>
>> <% if imagetrue then 'add this in case the users system has no flash%>
>>
>> <% end if%>
>> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
>> type="application/x-shockwave-flash" width="232"
>> height="132">

>> <%elseif not flashtrue and imagetrue%>
>> <%else%>
>>

Some text to describe the flash or image


>> <%end if%>
>>
>> The above script looks at the querystring coming from another page,
>> retrieves the paths to the swf and image files and inserts them into
>> the relative markup.
>>
>> >
>> > ref. source code as belloww:
>> >
>> > show.asp:
>> ><% id = request.querystring("id")
>> > strconn = "Driver={SQL
>> > Server};Description=sqldemo;SERVER=192.168.1.100;"
>> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
>> > server.createobject("adodb.connection") conn.open strconn
>> > sql = "SELECT image FROM items WHERE id = " & id
>> > set rs = createobject("ADODB.Recordset")
>> > rs.Open sql, conn,1,3,1
>> >
>> > movie = trim(rs("image"))
>> > rs.Close
>> > set rs = nothing %>
>> > >> >codebase="http://download.macromedia.com/pub/shockwave/cabs /flash/swfl
>> >as
>> > h .ca
>> > b#version=6,0,29,0" width="32" height="32">
>> >
>> >
>> > >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> > type="application/x-shockwave-flash" width="232"
>> > height="132">

>> >
>> >
>> >
>> >
>> >
>> > my showimg.asp :
>> >
>> >
>> ><%
>> > Dim id
>> > id = trim(Request.QueryString("id"))
>> >
>> > strconn = "Driver={SQL
>> > Server};Description=sqldemo;SERVER=192.168.1.100;"
>> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
>> > server.createobject("adodb.connection") conn.open strconn
>> > set rs_img=Server.Createobject("ADODB.Recordset")
>> > 'sql="select * from tbl_images where id='"&id&"'"
>> > sql="select * from items where id ='"&id&"'"
>> > rs_img.open sql,conn,1,3,1 %>
>> >
>> >
>> >
>> ><%
>> >
>> > Response.Expires = 0
>> > Response.Buffer = TRUE
>> > Response.Clear
>> >
>> > Response.ContentType = "application/x-shockwave-flash"
>> >
>> > Dim img_size
>> > img_size = rs_img("image").ActualSize
>> > Response.BinaryWrite rs_img("image").getChunk(img_size)
>> > rs_img.close
>> > set rs_img=nothing %>
>> >
>> >
>> >
>> >
>> > "Adrienne" дÈëÓʼþ
>> > news:Xns96692C24A40Earbpenyahoocom@207.115.63.158...
>> >> Gazing into my crystal ball I observed "frank"
>> >> writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:
>> >>
>> >> > Thank you very much!
>> >> > In my code,the showimg.asp is like this:
>> >> > I dont know why can I get the swf file with the name as
>> >> > showimg.asp but cannot show the swf file directly to IE.
>> >> >
>> >> ><%
>> >> > Dim id
>> >> > id = trim(Request("id"))
>> >>
>> >> Not a good idea to use Request("value"). The server has to look
>> >> through all possible collections (querystring, form,
>> >> servervariables, cookies) first until it finds the right one.
>> >> Better:
>> >>
>> >> if request.form("id") <> "" then
>> >> id = request.form("id")
>> >> elseif request.querystring("id") <> "" then
>> >> id = request.querystring("id")
>> >> elseif request.cookies("id") <> "" then
>> >> id = request.cookies("id")
>> >> end if
>> >>
>> >> Change to suit where the value may be coming from.
>> >>
>> >> >
>> >> > strconn = "Driver={SQL
>> >> > Server};Description=sqldemo;SERVER=192.168.1.100;"
>> >> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
>> >> > server.createobject("adodb.connection") conn.open strconn
>> >> > set rs_img=Server.Createobject("ADODB.Recordset")
>> >> > 'sql="select * from tbl_images where id='"&id&"'"
>> >> > sql="select * from items where id ='"&id&"'" rs_img.open
>> >> > sql,conn,1,3,1
>> >>
>> >> Not a good idea to use SELECT * - that selects ALL fields in your
>> >> table. If your table has many fields this can really affect
>> >> performance.
>> >>
>> >> >
>> >> > Response.Expires = 0
>> >> > Response.Buffer = TRUE
>> >> > Response.Clear
>> >> >
>> >> > Response.ContentType = "image/jpg"
>> >> >
>> >> > Dim img_size
>> >> > img_size = rs_img("image").ActualSize
>> >> > Response.BinaryWrite rs_img("image").getChunk(img_size)
>> >> > rs_img.close
>> >> > set rs_img=nothing %>
>> >> >
>> >>
>> >> A jpg is not a swf file. The browser does not know what to do.
>> >> You need to tell the browser explicitly the name of the swf file.
>> >> Look at my example again.
>> >>
>> >> >
>> >> > "Adrienne" дÈëÓʼþ
>> >> > news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
>> >> >> Gazing into my crystal ball I observed "frank"
>> >> >> writing in
>> >> >> news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
>> >> >>
>> >> >> > I can put swf file to sqlserver into its image field, and get
>> >> >> > it out from it. all by asp through IE.
>> >> >> > then i want to show it directly to IE,I use the code as
>> >> >> > bellow:
>> >> >> >
>> >> >> > >> >> >> >
>> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/
>> >> > swf las h
>> >> >> > .ca
>> >> >> > b#version=6,0,29,0" width="32" height="32">
>> >> >> > ">
>> >> >> >
>> >> >> > " quality="high"
>> >> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> >> > type="application/x-shockwave-flash" width="232"
>> >> >> > height="132">

>> >> >> >
>> >> >> > but i got negative result. after long time past, the flash swf
>> >> >> > was not there.
>> >> >> >
>> >> >> > Can anybody help me ?
>> >> >> >
>> >> >> > thanks in advance!
>> >> >> > Frank
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> The ASP page has to process the querystring to get the correct
>> >> >> movie from the table and insert its value into the src.
>> >> >>
>> >> >> <% id = request.querystring("id")
>> >> >>
>> >> >> sql = "SELECT movie FROM table WHERE id = " & id
>> >> >> set rs = createobject("ADODB.Recordset")
>> >> >> rs.Open sql, yourconnectionstring
>> >> >>
>> >> >> movie = trim(rs("movie"))
>> >> >> rs.Close
>> >> >> set rs = nothing %>
>> >> >> >> >> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash
>> >> >> /sw fla sh .ca b#version=6,0,29,0" width="32" height="32">
>> >> >>
>> >> >>
>> >> >> >> >> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
>> >> >> type="application/x-shockwave-flash" width="232"
>> >> >> height="132">

>> >> >>
>> >> >> --
>> >> >> Adrienne Boswell http://www.cavalcade-of-coding.info
>> >> >> Please respond to the group so others can share
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Adrienne Boswell http://www.cavalcade-of-coding.info
>> >> Please respond to the group so others can share
>> >
>> >
>> >
>>
>>
>>
>> --
>> Adrienne Boswell
>> http://www.cavalcade-of-coding.info
>> Please respond to the group so others can share
>
>
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: put flash swf file to sqlserver how to show it directly to IE

am 09.06.2005 06:58:52 von frank

I know the disadvantages of storing swf file to database, this time, I just
want to know how to show it from database directly to IE.
And I believe, most disadvantages of storing multimedia data to database
will be overcome in the future.
BTW, storing only the path and name to database, also has disadvantages,
such as file name modified and database not informed so that the link
between the file and the database with be wrong or broken....

Frank

"Adrienne" wrote
news:Xns966FDD31A901Carbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "frank"
> writing in news:#ZZFBKAbFHA.1384@TK2MSFTNGP09.phx.gbl:
>
> > OH£¡ My god£¡We made some misunderstanding ther.
> > What I want is to store swf file to databese,not only the path and file
> > name, and get it back from the database, and show the swf file directly
> > to IE, not store it to disk as file again and then show it to IE.
> > the diagram is like:
> >
> > swf - upload to server ->SQL Server(image field) --request by IE and
> > get it back from the field and send it to IE-->(not store to disk as
> > swf file again)Show it to IE.
> > I did not success at the last step.
>
> Trust me on this, you are much better off storing the swf file to disk and
> not the database. Storing to the database creates many issues:
> 1. Speed. It's faster to get the file from the disk than the DB
> 2. Data in BLOBs can get corrupted in a database and are less likely to
get
> corrupted on disk
> 3. It's easier to replace something on the disk. If the swf has changes,
> then it has to be stored in the database again, causing valuable time.
> 4. Easier to port to another system.
> 5. Other reasons
>
> Just store the path to the swf file and you will be a lot better off.
>
> >
> >
> > "Adrienne" > >
news:Xns966E60B3DDD03arbpenyahoocom@207.115.63.158...
> >> Gazing into my crystal ball I observed "frank"
> >> writing in news:ugWV$8xaFHA.3528@TK2MSFTNGP09.phx.gbl:
> >>
> >> > Thank you again!
> >> > but,I still cant show the flash file directly to IE.
> >> > 1,with show.asp?id=1,I got nothing except the running of flag on the
> >> > right up conner of IE.
> >> > 2,when I use http://192.168.1.100/show.asp?id=1 in the downloader
> >> > program(such as getright,flashget,netants...), I just got the source
> >> > code of show.asp
> >> > 3,with my showimg.asp, http://192.168,1,100/showimg.asp?id=1 in the
> >> > same downloader program, I got the flash swf file, but the name was
> >> > changed to showimg.asp, I can change its name to showimg.asp.swf and
> >> > show it by drag it to IE.But I cant let it show dirctly in IE.
> >>
> >> I don't think you understand what I'm talking about. This takes only
> >> one page to accomplish:
> >>
> >> <% dim id, flashtrue, imagetrue, swf, img
> >> id = request.querystring("id") 'gets the id from the querystring
> >>
> >> sql = "SELECT swf_path, img_path FROM table WHERE id = " & id
> >> 'selects only the path to the swf and image files from the table
> >> set rs = createobject("ADODB.Recordset")
> >> rs.Open sql, connectionstring
> >>
> >> if not isnull(rs("swf_path")) and trim(rs("swf_path")) <> "" then
> >> swf = trim(rs("swf_path"))
> >> flashtrue = true else
> >> flashtrue = false
> >> end if
> >> if not isnull(rs("img_path")) and trim(rs("img_path")) <> "" then
> >> img = trim(rs("img_path"))
> >> imagetrue = true else
> >> imagetrue = false
> >> end if
> >>
> >> 'now start building your HTML with accessibility in mind
> >> if flashtrue then
> >> %>
> >> > >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swfla
> >> s
> >> h .ca
> >> b#version=6,0,29,0" width="32" height="32">
> >>
> >>
> >> <% if imagetrue then 'add this in case the users system has no flash%>

> >>
> >> <% end if%>
> >> > >> pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> type="application/x-shockwave-flash" width="232"
> >> height="132">

> >> <%elseif not flashtrue and imagetrue%>
> >> <%else%>
> >>

Some text to describe the flash or image


> >> <%end if%>
> >>
> >> The above script looks at the querystring coming from another page,
> >> retrieves the paths to the swf and image files and inserts them into
> >> the relative markup.
> >>
> >> >
> >> > ref. source code as belloww:
> >> >
> >> > show.asp:
> >> ><% id = request.querystring("id")
> >> > strconn = "Driver={SQL
> >> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> >> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> >> > server.createobject("adodb.connection") conn.open strconn
> >> > sql = "SELECT image FROM items WHERE id = " & id
> >> > set rs = createobject("ADODB.Recordset")
> >> > rs.Open sql, conn,1,3,1
> >> >
> >> > movie = trim(rs("image"))
> >> > rs.Close
> >> > set rs = nothing %>
> >> > > >> >codebase="http://download.macromedia.com/pub/shockwave/cabs /flash/swfl
> >> >as
> >> > h .ca
> >> > b#version=6,0,29,0" width="32" height="32">
> >> >
> >> >
> >> > > >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> > type="application/x-shockwave-flash" width="232"
> >> > height="132">

> >> >
> >> >
> >> >
> >> >
> >> >
> >> > my showimg.asp :
> >> >
> >> >
> >> ><%
> >> > Dim id
> >> > id = trim(Request.QueryString("id"))
> >> >
> >> > strconn = "Driver={SQL
> >> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> >> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> >> > server.createobject("adodb.connection") conn.open strconn
> >> > set rs_img=Server.Createobject("ADODB.Recordset")
> >> > 'sql="select * from tbl_images where id='"&id&"'"
> >> > sql="select * from items where id ='"&id&"'"
> >> > rs_img.open sql,conn,1,3,1 %>
> >> >
> >> >
> >> >
> >> ><%
> >> >
> >> > Response.Expires = 0
> >> > Response.Buffer = TRUE
> >> > Response.Clear
> >> >
> >> > Response.ContentType = "application/x-shockwave-flash"
> >> >
> >> > Dim img_size
> >> > img_size = rs_img("image").ActualSize
> >> > Response.BinaryWrite rs_img("image").getChunk(img_size)
> >> > rs_img.close
> >> > set rs_img=nothing %>
> >> >
> >> >
> >> >
> >> >
> >> > "Adrienne"
> >> > news:Xns96692C24A40Earbpenyahoocom@207.115.63.158...
> >> >> Gazing into my crystal ball I observed "frank"
> >> >> writing in news:OXIJ0WzZFHA.3568@TK2MSFTNGP10.phx.gbl:
> >> >>
> >> >> > Thank you very much!
> >> >> > In my code,the showimg.asp is like this:
> >> >> > I dont know why can I get the swf file with the name as
> >> >> > showimg.asp but cannot show the swf file directly to IE.
> >> >> >
> >> >> ><%
> >> >> > Dim id
> >> >> > id = trim(Request("id"))
> >> >>
> >> >> Not a good idea to use Request("value"). The server has to look
> >> >> through all possible collections (querystring, form,
> >> >> servervariables, cookies) first until it finds the right one.
> >> >> Better:
> >> >>
> >> >> if request.form("id") <> "" then
> >> >> id = request.form("id")
> >> >> elseif request.querystring("id") <> "" then
> >> >> id = request.querystring("id")
> >> >> elseif request.cookies("id") <> "" then
> >> >> id = request.cookies("id")
> >> >> end if
> >> >>
> >> >> Change to suit where the value may be coming from.
> >> >>
> >> >> >
> >> >> > strconn = "Driver={SQL
> >> >> > Server};Description=sqldemo;SERVER=192.168.1.100;"
> >> >> > &"UID=sa;Password=Frank;DATABASE=webtest" set conn =
> >> >> > server.createobject("adodb.connection") conn.open strconn
> >> >> > set rs_img=Server.Createobject("ADODB.Recordset")
> >> >> > 'sql="select * from tbl_images where id='"&id&"'"
> >> >> > sql="select * from items where id ='"&id&"'" rs_img.open
> >> >> > sql,conn,1,3,1
> >> >>
> >> >> Not a good idea to use SELECT * - that selects ALL fields in your
> >> >> table. If your table has many fields this can really affect
> >> >> performance.
> >> >>
> >> >> >
> >> >> > Response.Expires = 0
> >> >> > Response.Buffer = TRUE
> >> >> > Response.Clear
> >> >> >
> >> >> > Response.ContentType = "image/jpg"
> >> >> >
> >> >> > Dim img_size
> >> >> > img_size = rs_img("image").ActualSize
> >> >> > Response.BinaryWrite rs_img("image").getChunk(img_size)
> >> >> > rs_img.close
> >> >> > set rs_img=nothing %>
> >> >> >
> >> >>
> >> >> A jpg is not a swf file. The browser does not know what to do.
> >> >> You need to tell the browser explicitly the name of the swf file.
> >> >> Look at my example again.
> >> >>
> >> >> >
> >> >> > "Adrienne" > >> >> >
news:Xns9668DA926CDBDarbpenyahoocom@207.115.63.158...
> >> >> >> Gazing into my crystal ball I observed "frank"
> >> >> >> writing in
> >> >> >> news:OmbUnVyZFHA.3488@tk2msftngp13.phx.gbl:
> >> >> >>
> >> >> >> > I can put swf file to sqlserver into its image field, and get
> >> >> >> > it out from it. all by asp through IE.
> >> >> >> > then i want to show it directly to IE,I use the code as
> >> >> >> > bellow:
> >> >> >> >
> >> >> >> > > >> >> >> >
> >> >> > codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/
> >> >> > swf las h
> >> >> >> > .ca
> >> >> >> > b#version=6,0,29,0" width="32" height="32">
> >> >> >> > ">
> >> >> >> >
> >> >> >> > " quality="high"
> >> >> >> > pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> >> >> > type="application/x-shockwave-flash" width="232"
> >> >> >> > height="132">

> >> >> >> >
> >> >> >> > but i got negative result. after long time past, the flash swf
> >> >> >> > was not there.
> >> >> >> >
> >> >> >> > Can anybody help me ?
> >> >> >> >
> >> >> >> > thanks in advance!
> >> >> >> > Frank
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >> The ASP page has to process the querystring to get the correct
> >> >> >> movie from the table and insert its value into the src.
> >> >> >>
> >> >> >> <% id = request.querystring("id")
> >> >> >>
> >> >> >> sql = "SELECT movie FROM table WHERE id = " & id
> >> >> >> set rs = createobject("ADODB.Recordset")
> >> >> >> rs.Open sql, yourconnectionstring
> >> >> >>
> >> >> >> movie = trim(rs("movie"))
> >> >> >> rs.Close
> >> >> >> set rs = nothing %>
> >> >> >> > >> >> >> codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash
> >> >> >> /sw fla sh .ca b#version=6,0,29,0" width="32" height="32">
> >> >> >>
> >> >> >>
> >> >> >> > >> >> >> pluginspage="http://www.macromedia.com/go/getflashplayer"
> >> >> >> type="application/x-shockwave-flash" width="232"
> >> >> >> height="132">

> >> >> >>
> >> >> >> --
> >> >> >> Adrienne Boswell http://www.cavalcade-of-coding.info
> >> >> >> Please respond to the group so others can share
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Adrienne Boswell http://www.cavalcade-of-coding.info
> >> >> Please respond to the group so others can share
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Adrienne Boswell
> >> http://www.cavalcade-of-coding.info
> >> Please respond to the group so others can share
> >
> >
> >
>
>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share