Flash Forms and Database Integration tutorial

the tutorial is doing fine…however one question when I try to change the action of the button to “loadVariablesNum” it is not working?

what do i do wrong?

Hey guys… my flash file works great when running from my hard drive. The database collects the info.
The problem occurs when I test my swf from my site online and it doesn’t write to the database.

Is it a reference/address problem?
Thanks!

well for one are you getting any errors? or is nothing be entered?

could be a few reasons:

  1. check your permissions of your database folder
  2. check your path to your database
  3. some web servers don’t allow “.” - meaning you can’t use …/database/db.mdb as a path. you may have to use the harddrive letter.

what i would do is the following:

instead of using loadVariables replace it with a getURL. this way you can see an error message being printed, and you can find out the problem.

so do that, and post the error message

Digitalosophy, thanks for the tips. I changed loadvariables to getURL and it works. But I would like to refrain from using getURL.

So, getURL works from the site but not from my swf running from local drive…whereas with loadvariablesnum it worked from local drive but not site. does this help tell you where my problem is?

Also, one thing i have noticed is that when it doesn’t write the fields to the DB, it does however create a blank record in the DB.

Thanks!

Ok yea I would refrain using getURL() as well. That’s just good for troubleshooting.

If you use a full URL as a path the data will get inserted into your db from a local machine. Meaning as long as your asp file is online and on a server that supports ASP you don’t need to test the swf from the web server.

You can only run the files from a local machine (assuming IIS is set up properly) by accessing the page by either IP or localhost i.e.
http://localhost/flash_asp/file.swf
http://123.345.678.101/flash_asp/file.swf

So unless you ran it like that then it couldnt have worked on a local machine.

I’m not sure what you mean by this

Also, one thing i have noticed is that when it doesn’t write the fields to the DB, it does however create a blank record in the DB.

When I tested from [U]local with loadvariablesNum[/U], it [U]wrote the fields [/U] from the form to fields in database great.

When tested from [U]site with loadvariablesNum[/U], it [U]doesn’t write the fields [/U] from form to fields in DB (it creates a record with blank fields).

And vice versa for getURL: from site --> wrote fields from form to fields in DB; from local, we have a record but blank fields.

Thanks.

change the target of the url from “_self” to “_new” and echo the variables to the screen? Should show you what’s being inputed into the database (well what should be at least.)