to further understand my problem try looking at the codes below.
This are the codes in c#
Code: Select all
Hashtable paramss = new Hashtable();
paramss["username1"] = username;
paramss["password2"] = password;
smartFox.SendXtMessage("myext", "updData", paramss);
This are the code in Actionscript Extension
Code: Select all
// a global variable
var dbase
/*
* Initializion point:
*
* this function is called as soon as the extension
* is loaded in the server.
*
* You can add here all the initialization code
*
*/
function init()
{
trace("Initing dbExtension")
// get a reference to the database manager object
// This will let you interact the database configure for this zone
dbase = _server.getDatabaseManager()
}
function destroy()
{
// Release the reference to the dbase manager
delete dbase
}
function handleRequest(cmd, params, user, fromRoom)
{
trace("h2dbhandrequest")
if (cmd == cmd)//before (getList="1")
{
sendComputerList(user,cmd)
}
}
function sendComputerList(user,cmd)
{
var sql = "SELECT * FROM contacts where ID="+cmd+""
// execute query on DB
// queryRes is a ResultSet object
var queryRes = dbase.executeQuery(sql)
if (queryRes != null)
{
var response = {}
response._cmd = cmd
response.list = queryRes
_server.sendResponse(response, -1, null, [user])
}
}
/*
* This method handles internal events
* Internal events are dispactched by the Zone or Room where the extension is attached to
*
* the (evt) object
*/
function handleInternalEvent(evt)
{
trace("h2dbhandleinternalevent " + evt.toString())
// Code for handling events goes here...
}
Thanks in Advance..