PDA

View Full Version : help! - FORM thru ASP to MDB thru ASP to FLASH - help!


Jon B
09-06-2002, 10:49 AM
ok, i have a form which submits the date, subject and comment into a database via asp. The ms access database has four columns - the first is an auto number thing and i don't think it counts as a real column, the second is the date in dd/mm/yy format, the third is the subject, and the fourth is the comment. Now what i need is a way to extract that data from the database using asp and put it in flash (I have mx) as a scrollable text area which allows you to scroll thru all the comments in reverse order (most recent comment first). It gets more tricky because on the line above each comment I want to display the date from the db and subject from the db.

What would also be good is a way to automatically remove the oldest comments so that there was only ever say 10 comments in the database at any one time.

Please, please somebody give me some serious help - i'm completely stuck and hate script.

I've included my files for you to look at, altho you will have be able to run asp files obviously.

Thanks, Jon

P.S. feel free to e-mail me with any questions about this if you have any.

hangalot
09-10-2002, 11:38 PM
What would also be good is a way to automatically remove the oldest comments so that there was only ever say 10 comments in the database at any one time + allows you to scroll thru all the comments in reverse order = the SELECT statement in u'r query

Now what i need is a way to extract that data from the database using asp and put it in flash (I have mx) == XML

as a scrollable text area which allows you to scroll thru all the comments + It gets more tricky because on the line above each comment I want to display the date from the db and subject from the db. == script

the first is an auto number thing and i don't think it counts as a real column -- :confused: -- try reading something about relational databases!!!!

Jon B
09-11-2002, 12:52 AM
what you told me is the obvious part - I need help with the actual script. I appreciate you taking the time to post a reply, but it was all kinda useless I'm afraid. I'm a script newbie, unless it's html I have very little understanding and whilst it is a hinderance to not know, I feel quite pleased in a way coz so many code monkeys come across as extremely arrogant. Whether or not you fit into that catergory I don't know as I haven't had any real dealings with you, I apologise if I have caused any offence unjustly. I just hate being patronised.

tg
09-11-2002, 03:14 PM
how much asp/sql do you know?
i'll assume little to none, so my suggestion is to look at a couple of sites:

heres a good one for learning sql:
http://www.sqlcourse.com/

here are some asp sites to check out:
http://www.asp101.com
http://www.4guysfromrolla.com/
http://www.aspfaq.com
http://www.devguru.com/home.asp

to connect to a db with asp you will also need to know some ADO commands the devguru site will help get you started with that also.

so looks like you need to know how to update a db (lookup 'update' in the sqlcourse site)
delete a record (also the sql site)
select records (sql site)

write asp scripts to handle the data to do all of the above (any or all of the asp sites)

and display it all in the correct format inside flash.

some of this stuff you'll need to figure out how you want to send stuff back and forth between asp and flash (hangalot seems to prefer xml), i prefer packing everything into a comma delimited string and then putting it into arrays and dealing with it from there (probably cause i havn't bothered to learn xml yet).

any way. this is getting pretty long, so i'm gonna cut it short here. break you stuff up into little pieces.
start by seeing if you can get asp to display you records by itself (with out importing into flash), once thats working, write your scripts to update your records, and delete the oldest records if more than 10 records exist.
finally once you get that done, then comes the fun part of getting it to integrate with flash.

so, break the job up, concentrate on 1 item at a time, and come back here to ask specific questions about the task at hand.

hope this has been helpful, thats what it is meant to be.

Jon B
09-11-2002, 03:24 PM
thanks for the tips - I understand what you are saying. Basically I'm gonna have to do some very quick learning and testing. I was hoping to be lazy and somebody would have the solution - trouble is it all sounds more complex than I thought.

About the comma delimited string and xml things - I've seen the transfer of text into flash done from an html page too, I thought flash could only read txt files and somehow integrate with xml. The code on the html page tho wasn't html as such - it was just like the method you's use with txt files but with a html extension/suffix.

tg
09-11-2002, 03:44 PM
yes, i use asp and coldfusion to grab info from dbs alot.
the server scripts grab the data, then create a file that looks like:

&name=bob,john,sam,jay,ken&nbr=4,8,7,9,2&

so when flash calls the asp/cfm file the script grabs the info from the db, creates the string and flash reads the string in.
then in flash i now have 2 variables (name & nbr) which i split it into arrays and do what i please with them.

don't give up, someone may yet come along and do the work for you, but to be on the safe side, you may want to bone up alittle on some of this stuff.

Jon B
09-11-2002, 03:53 PM
I will be learning asp and php and coldfusion and loads of other stuff - I find it really hard to learn from the internet - I always have to print everything off to read coz it doesn't sink in from the screen. I'm off to uni next year to study multimedia so that should be good for my brains. I like what script can do but hate using it - I have always been a visual person and my forte is drawing painting and design - I chose multimedia coz i get on well with computers, it's just languages I have problems with. I got a G in GCSE french you know :-(