A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: SQL queries & reference variables in flash

  1. #1
    Junior Member
    Join Date
    Jun 2000
    Posts
    2
    I have generator, and an access database.

    If I were to query "SELECT * FROM [tablename]", and there were more than one entry for the *, such as a table like below:

    [tablename]
    Num | Color | size
    -----------------------
    1 | blue | large
    2 | red | small
    3 | green | medium
    4 | orange | tiny


    since I query'd " * " then I would theoretically get back the whole table. How would I reference each individual element?

    Also how would I perhaps detect how many elements were taken out, and then report back to find out the number of elements in the list?

    Thanks,
    Sean


  2. #2
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175

    Post

    Lets say that you have simple script like

    Set RS = Server.CreateObject("ADODB.Recordset")
    MyConnStr ="DBQ=C:\path\name.mdb ;DRIVER={Microsoft Access Driver (*.mdb)}"
    sql = "Select * from tablename"
    RS.Open sql, MyConnStr, , , adCmdTable
    RS.MoveFirst

    So after it, for example
    RS("color") will return "blue" and RS(2) - "large"

    And after
    RS.MoveNext

    RS("num") will return "2" and RS(1) - "red"

    Hope it will help

  3. #3
    Junior Member
    Join Date
    Jun 2000
    Posts
    2

    ok . . .

    I understand that much, what I want is to be able to set a data source in generator and have the flash animation reference a variable for each row in the animation or something like that.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center