Data retrieval from MS SQLwith ASP.NET 2.0

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  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. Similar Questions and Discussions

    1. XML and Flash Data Retrieval
      I am new to flash's dynamic data uses - I have a 100 responses to 23 question form which I wish to display using flash in a presentation - I wish to...
    2. BLOB retrieval
      I'm trying to query a blob from the database and then play it as a .mov in the browser. It works on one server but not the other? For both...
    3. Input on Searching and Data Retrieval for a PDF Collection
      Hello, I am looking for input on what tools and/or programming environment should be selected for a PDF search project. The final product will be...
    4. NT Login retrieval
      Perhaps this. http://www.darkfalz.com/1109 Ray at home -- Will trade ASP help for SQL Server help "Eric" <unibrow@one.net> wrote in...
    5. Performance of Data retrieval
      How to improve the performance pf 50 Lakhs data in SQL Server Database from my Application. What are the all measures to improve the performance...
  3. #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

Posting Permissions

  • You may not post new threads
  • You may 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