Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    Lets say that I have a Flash button and I want it to send certain values to fields in a a database.

    SCENARIO:
    DATABASE=CANADA.MDB
    TABLE NAME=
    DSN=CAN
    FIELDS IN TABLE=Button, Date, Time

    If the button is clicked, I want it to send "the name of the button (variable in movie), date it was clicked, and time it was clicked to the table in the database.

    Anyone have any clues on this?

    I don't have Generator, nor can I afford it right now. But if this problem gets fixed, maybe I can?

    Thanks in advance,

    Scott
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    Lets say that I have a Flash button and I want it to send certain values to fields in a a database.

    SCENARIO:
    DATABASE=CANADA.MDB
    TABLE NAME=
    DSN=CAN
    FIELDS IN TABLE=Button, Date, Time

    If the button is clicked, I want it to send "the name of the button (variable in movie), date it was clicked, and time it was clicked to the table in the database.

    Anyone have any clues on this?

    I don't have Generator, nor can I afford it right now. But if this problem gets fixed, maybe I can?

    Thanks in advance,

    Scott
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    ...or other server-side development. Look into PHP or Perl or some other sort of server-side scripting languages to accomplish this. My personal preference is PHP since it's so simple to learn, and yet really quite powerful. Perl is easy to learn, too, but a bit cryptic if you don't have a programming background. If you're using a Windoze server (read: IIS) then you may want to learn ASP - either way, all of these will allow you to interact with a database. Since it looks like you're using Access, you'll probably be using IIS and ASP - but if you decide to switch and use PHP or something of the sort, then consider switching to mySQL or PostgreSQL for your DB engine (both of which are free and come with Linux). Of course, if you have the big bucks, then get Oracle...but not everyone has that much money to throw around. <grin>

    Anyway, if you get lost with where to start, let us know and we'll go into more detail.


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Interactive Developer
    http://www.bluespark.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  4. #4
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    ooh...oops! i didn't notice the "ASP" part in your subject line...sorry!

    try something like this:

    <%
    ' init the vars/read the vars
    myDataSource = request.form("DSN")
    myUID = request.form("UID")
    myPWD = request.form("PWD")
    myTable = request.form("TABLE")
    myFieldsList = request.form("FIELDS_IN_TABLE")

    ' parse the fields list
    ' I leave this as an excercise to the reader
    ' basically, parse the list into separate
    ' variables. i'll assume the vars are the same
    ' as the field names, preceded by the word
    ' "my" - such as myButton, etc.


    ' open the DB
    myDSN="DSN=" & myDataSource & ";uid=" & myUID & ";pwd=" & myPWD
    set conntemp=server.createobject("adodb.connection")
    conntemp.open myDSN

    ' put the values in the DB
    mySQLStatement = "INSERT INTO " & myTable & " ('"
    mySQLStatement = mySQLStatement & myButton & "', " & myDate & ", " & myTime & ")"

    ' note myDate and myTime can be found using ASP
    ' itself, if you choose

    set execTemp = conntemp.execute(mySQLStatement)

    ' check for errors
    ' i leave this as an excercise for the reader
    ' hint - check err.number first, then check
    ' conntemp.errors afterward

    ' if there are no errors, close the db connection
    execTemp.close
    set execTemp = nothing
    conntemp.close
    set conntemp = nothing
    %>

    This is just a start - I'll leave you to figure out the rest. But this should put you on the right track.


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Interactive Developer
    http://www.bluespark.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    You're a smart guy Deep. Thanks,

    Scott
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •