Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / April 2004



Tip: Looking for answers? Try searching our database.

Insert data into DB w/ Server-Side Actionscript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MatteoSanchez - 21 Apr 2004 08:14 GMT
Hi,

I'm looking for some documentation on inserting data into a DB with SSAS. I've seen many examples of retrieving data, but is it possible to insert it as well?

Thanks in advance.
Jens Hauser - 21 Apr 2004 10:41 GMT
I haven´t done any SSAS but I have read the book Flash Remoting: The
Definitive Guide by Tom Muck. He has put up the example code at
http://www.flash-remoting.com/examples/master.cfm. I think there are useful
files to look into.

Jens

> Hi,
>
> I'm looking for some documentation on inserting data into a DB with SSAS. I've seen many examples of retrieving data, but is it possible to insert it
as well?

> Thanks in advance.
intrepid_12 - 27 Apr 2004 10:18 GMT
Hi,
I use SSAS for inserting and retrieving data from my DB. If you haven't
already figured it out, here is an example:

function newAnswer(addData) {
  var sql = "INSERT INTO students.answer ";
  sql += " (id";
  sql += " , question";
  sql += " , answers";
  sql += " , testname";
  sql += " , items";
  sql += " , weights)";
  sql += " VALUES ";
  sql += " (" + addData.get("id");
  sql += "," +addData.get("question")+"";
  sql += "," +addData.get("answers")+"";
  sql += ",'" +addData.get("testname")+"'";
  sql += ",'" +addData.get("items")+"'";
  sql += "," +addData.get("weights")+""+")";
  try {
    CF.query("students",sql);
  }catch(e){
    throw sql//"There was a database error";
  }
}

In Flash you must send the parameters:

var addData = {id:user, question:question, answers:answer, testname:name,
items:item, weights:weight};
serviceObject.newAnswer(addData);

Hope this helped
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.