Difference between revisions of "XsConnectToDatabase"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 22: Line 22:
** This product is pending a {{DuoGrid Link}}-Compatible badge. This will make it work on the Main Grid as well.
** This product is pending a {{DuoGrid Link}}-Compatible badge. This will make it work on the Main Grid as well.
|examples=
|examples=
<pre>
<lsl>default
default
{
{
     xsConnectToDatabase(integer id, string user, key password, list params)
     xsConnectToDatabase(integer id, string user, key password, list params)
Line 41: Line 40:
         xsConnectToDatabase(39,"Average_User",123456,["mode.sysop"]);
         xsConnectToDatabase(39,"Average_User",123456,["mode.sysop"]);
     }
     }
}


        //That will start the connection, and finally the runtime script will "say" the results in
//That will start the connection, and finally the runtime script will "say" the results in
        //the chosen format.
//the chosen format.
        //If the owner chose to display them public, it will show them in [[DEBUG_CHANNEL]].
//If the owner chose to display them public, it will show them in [[DEBUG_CHANNEL]].


        //Results:
//Results:
        XS Runtime (Object): Connection successful, however, 1 warning has occurred.
//XS Runtime (Object): Connection successful, however, 1 warning has occurred.
        XS Runtime (Object): WARNING 29: Your parameter "Mode.Sysop" has been declined by the server.
//XS Runtime (Object): WARNING 29: Your parameter "Mode.Sysop" has been declined by the server.
You are connected as your permission level allows (Bureaucrat).
//You are connected as your permission level allows (Bureaucrat).
}
</lsl>
</pre>
|helpers
|helpers
|also_header
|also_header

Revision as of 22:54, 17 July 2008

Emblem-important-red.png Software Dependency Warning!

This specific command and other "'xs'-prefixed" commands require the Xenon Systems runtime script, and several blocks of code for the aliases (commands with the "xs" prefix).

Summary

Function: xsConnectToDatabase( integer id, string user, key password, list params );

Connects to database id with user ID user and password password. Also uses params for additional parameters if used.

• integer id Database ID. Must be registered with central server!.
• string user User ID to login to database. Must use underscores (_) instead of spaces.
• key password Associated ID password. Must be between 4 and 16 chars. Only numbers and letters are accepted.
• list params Parameters to change default settings to suit the current session. (Optional)

Caveats

  • This function causes the script to sleep for 5.0 seconds.
  • This script requires the Xenon Systems Runtime File and a few code modifications to include the appropriate aliases.
  • The object containing the runtime file will change its name for any notifications. However, it will change back as soon as the notification has been sent. (For example, from "Object" to "XS Runtime (Object)" and back.)
  • This command, associated dependencies, and supported products are available only on the Teen Grid at the moment.
    • This product is pending a DuoGrid-Compatible badge. This will make it work on the Main Grid as well.

Examples

<lsl>default {

   xsConnectToDatabase(integer id, string user, key password, list params)
   {
llMessageLinked(LINK_SET,0215,id + "~" + user + "~" + password,llDumpList2String(params,"