Professional Web Applications Themes

Data retrieval from MS SQLwith ASP.NET 2.0 - Macromedia Flash Data Integration

Can somebody provide a simple example that gets data from MS SQL /MysQL with ASP.NET 2.0 and displays it in Flash without using Flash Remoting. Where you have a previous and next button to scroll through the data and displays it in a textbox. I currently have the Foundation ASP.NET for Flash book and find the examples not useful for me as they use webservices are bit too comprehensive for me. On the Web most examples are for PHP/Flash or ASP/Flash and the only ASP.NET example i found is for verifying a login. Please help!...

  1. #1

    Default Data retrieval from MS SQLwith ASP.NET 2.0

    Can somebody provide a simple example that gets data from MS SQL /MysQL with
    ASP.NET 2.0 and displays it in Flash without using Flash Remoting. Where you
    have a previous and next button to scroll through the data and displays it in
    a textbox. I currently have the Foundation ASP.NET for Flash book and find the
    examples not useful for me as they use webservices are bit too comprehensive
    for me. On the Web most examples are for PHP/Flash or ASP/Flash and the only
    ASP.NET example i found is for verifying a login.
    Please help!

    Mzekeke Guest

  2. #2

    Default Re: Data retrieval from MS SQLwith ASP.NET 2.0

    Alright after exhaustively trying to get Flash/ASP.NET 2.0and MSSQL i almost
    gave up until i ran across a tutorial at [url]www.flash-db.com[/url]. Though the code was
    in ASP i managed to get it converted with assistance to ASP.NET C#.
    The bproblem i now face is that although the ASPX page compiles(with no
    errors) and displays the data from the database when i run the flash movie
    It displays nothing. I assumed that i wouldn't have to change the Actionscript
    file as i sawthat it's the same for ASP and PHP thus by extension thought it
    should work fine also with ASP.net but it doesn't Anyway here's the code

    Actionscript

    //Create LoadVars object and load file
    myData = new LoadVars()
    //This is the line i changed to simply load the ASPX page
    myData.load("Default.aspx")
    myData.ref = this
    //Fetch data
    myData.onLoad = function(succes){
    if(succes){
    for(var i=0; i<this.cant; i++){
    this.ref["Title_txt"+i].htmlText = ""+this["Title"+i]+""
    this.ref["Comments_txt"+i].text = this["Comments"+i]
    this.ref["holder_mc"+i].loadMovie(this["Image"+i])
    }
    } else trace("Error loading data")
    }
    stop()[/CODE]

    And the ASPX code
    Code:
       SqlConnection cn = new SqlConnection("Data
    Source=LENOVO197\MSSMLBIZ;Initial Catalog=anastasio;Integrated Security=True");
    
    SqlCommand cmd = new SqlCommand("SELECT Title, Comments, Image FROM
    titles");
    cmd.CommandType = CommandType.Text;
    cmd.Connection = cn;
    cn.Open();
    SqlDataReader reader = cmd.ExecuteReader();
    
    
    int cont = 0;
    while (reader.Read())
    {
    Response.Write("Title" + cont.ToString() + "=" + reader["Title"]
    + "&" + "Comments" + cont + "=" + reader["Comments"]+ "&" +
    "Image"
    + cont.ToString() + "=" + reader["Image"] + "&");
    cont = cont + 1;
    }
    Response.Write("cont=" + cont.ToString());
    cn.Close();
    }
    }
    Please help

    Mzekeke Guest

Similar Threads

  1. XML and Flash Data Retrieval
    By stacyp in forum Macromedia Flash Data Integration
    Replies: 1
    Last Post: April 18th, 08:02 PM
  2. BLOB retrieval
    By bengland34 in forum Coldfusion Server Administration
    Replies: 3
    Last Post: September 30th, 07:53 PM
  3. Input on Searching and Data Retrieval for a PDF Collection
    By Wilbur_Shen@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: May 20th, 09:03 AM
  4. NT Login retrieval
    By Ray at in forum ASP
    Replies: 0
    Last Post: August 7th, 01:38 AM
  5. Performance of Data retrieval
    By Udayakumar.S in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: June 30th, 06:22 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139