Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: getting a SQL response into flash
From: Damian Morton
Date: Mon, 28 Feb 2000 04:39:04 GMT


> From: Vipin Kanwar
> Sent: Sunday, February 27, 2000 4:56 PM
> Subject: FLASH: getting a SQL response into flash
>
> I'm at it again. Here's another of those database, asp question.
>
> Can someone tell me how to get the results of a SQL query (from an asp
> file) into a flash movie?

The following code will execute an SQL statement and return a set of results
in the correct format for your flash application.

Assuming the SQL table 'myTable' has the columns 'name', 'address', 'age',
you will get the following variables loaded into your movieclip

name1=fred
address1=myaddress
age1=20
name2=john
address2=hisaddress
age2=35
numrecords=2

NOTE: you will also need to escape the strings written using response.write;
this means changing all spaces to '%20' and such. Theres a function to do it
in JScrpt, but not in VBscript. Shouldnt be too hard to write your own - i
just dont happen to have one handy. ALternatively, you could make this a
Jscript page.

----------------------------- sql.asp ---------------------------------
<%
response.expires = -1
response.contenttype = "application/x-www-urlformencoded"

set rs = con.execute "select * from myTable where name like 'smith%'"

i = 0
while not rs.eof
i = i + 1
for f in rs.fields
response.write f.name & i & "=" & f.value & "&"
next
rs.movenext
wend

response.write "numrecords="&i
%>


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World’s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: getting a SQL response into f, Damian Morton

Replies
  FLASH: getting a SQL response into flash, Vipin Kanwar

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]