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:
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">
> ">
>
>
>
>
> 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">
--
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
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">
> > ">
> >
> >
> >
> >
> > 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.
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">
>> > ">
>> >
>> >
>> >
>> > 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">