To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Display Modes
Old 02-13-2003, 08:42 AM   #1
koglakci
Senior Member
 
Join Date: Jan 2001
Posts: 143
Flash and databases

Hello,

Can anyone point me in the right direction for connecting flash to a database.
I come from an asp/mysql background....and am wondering if you can use Microsoft access or does flash have a dedicated database for it??


any help on this topic would be very appreciated.

Thanks
Kaan
koglakci is offline   Reply With Quote
Old 02-13-2003, 09:07 AM   #2
Ex-Ess
Senior Member
 
Ex-Ess's Avatar
 
Join Date: Nov 2002
Location: York (England)
Posts: 586
ASP+Access equals perfect

You can easily use asp and access database to talk to flash. What is it you want to do with it?

I've played around with this loads.....once ya get yer head around it, it's very simple.....As you already know asp it'll be a doddle!!
Ex-Ess is offline   Reply With Quote
Old 02-13-2003, 10:34 AM   #3
koglakci
Senior Member
 
Join Date: Jan 2001
Posts: 143
hi, what I what to be able to write n read from a database. Read text from db and it into flash as text or to be able to write to a database from a text box in flash.
koglakci is offline   Reply With Quote
Old 02-13-2003, 11:01 AM   #4
Ex-Ess
Senior Member
 
Ex-Ess's Avatar
 
Join Date: Nov 2002
Location: York (England)
Posts: 586
To Read From Database:
Create your ASP script as you normally would to read the details from your DB. Instead of creating the page using HTML and stuff just assign the data from the db to variables, eg..

userName = rs.Fields("userName").Value
password = rs.Fields("userName").Value

once you know this page works without flash move on...

In the flash file (before you need the info from the DB) use loadVariables("nameOfASPPage.asp");

That line opens the ASP file and runs the script and recieves the variables defined within it.

After that you will be able to call userName or password from the root of the movie you put the loadVariables function.

I suggest that in the ASP file you put a loaded=true variable right at the bottom. Then in Flash do a frame loop until loaded == "true". That way you can be sure all your variables are loaded before continuing (took me ages to figure that one out!)


To write to the DB you would do exactly the same but the variables are created in Flash and you use:
loadVariables("nameOfASPPage.asp","","POST");

Then in the ASP file you would use Request("variable")



Any more help you need let me know.
Ex-Ess is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:25 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.