Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

database connectivity

CSUFdev001 Lemon
Registered User
Join date: 1 Sep 2008
Posts: 2
09-07-2008 12:58
Is there any way to have SL connect to our database to pull/push data?

Goal

SL as user form ---> our database
SL as user report <--- our database

Basically there are 4 items we currently work with (most IT shops work with)

sql/queries
forms
reports
the database itself

it would be nice if we could use SL as the form or report method dynamically. we are a new dev team working for a college. we will also be reviewing the lsl documentation.
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
09-07-2008 16:19
You might wanna look at these Wiki-Pages:

To send data to a database (and get a result back):

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llHTTPRequest

Be aware that the response you get from any http-request is limited to 2048 bytes.


To push data to SL:

http://www.lslwiki.net/lslwiki/wakka.php?wakka=xmlrpc

XMLRPC hats its issues as well (as you can see on the wiki-page).


Looking at your post raises some questions, though. There aren't such things as «forms» in SL. Every user interaction is either done via chat or «blue menus» where a user can click a button (which ends up in a predefined answer). If a user has to enter her/his address, for example, you'd basically ask for every single form-field separetely.

E.g.

Object: please say your name in the chat
User: Doe
Object saves the name and goes on
Object: please say your firstname in the chat:
User: John.
Object saves the firstname and goes on
Object: please say your address in the chat
... and so on.

Once all the data is gathered, you send it to the server where it's processed. Then, the server sends an answer back to SL, confirming the data or an error message (i.e. invalid mail-address).

There's a potential new form of a blue menu coming up where users can enter data in a textbox in the blue menu. This won't let you do complex forms like on a HTML-Page but the users wouldn't have to type stuff into chat, which makes the whole process a little easier.

Another method would be to let the user enter the data into a notecard which could be dropped into a prim. A script, which processes this data could then send it to the server. But this method raises even more questions about data-quality...

Not to mention that security is again another issue you have to think of...

As to reports: You could present the results of a query with HTML-on-a-prim, which basically just displays a HTML-Page on a prim surface. This is ok for lists and stuff. If you want to - let's say - display some statistics, you can use prims to represent the values of your query result. Let's say your query returns the overall sales for the shops of a company, you could use prims to represent the shops and their length/size/shape/color/texture, to represent the number... The possibilities here are pretty much endless.

All this really depends on what you want to achieve with your application... :)
CSUFdev001 Lemon
Registered User
Join date: 1 Sep 2008
Posts: 2
09-08-2008 04:26
Thank you very much Haruki Watanabe.