Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

how can I connect database??

Xeaustin Twine
Registered User
Join date: 31 Jul 2008
Posts: 15
09-12-2008 01:57
Hi,
Am new to SL and LSL.I wanna connect database into sl.Give me any scripting for that or give any good tutorial link for that.And also i have well knowledge in Java,J2ee,html,oracle and mysql.If it is possible to use those languages in sl.If it is possible means please give me any tutorial link for that.I have already searched on net.But I couldn`t get correct solution for those things.

Thanks in advance.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
09-12-2008 03:25
You cannot actually connect to a database directly with LSL. The usual method is to write a web front-end, in PHP or what have you, which does all of your database work, and then send requests to that via the llHTTPRequest function. It then sends back the results, which you obtain from the http_response() event.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Kephra Nurmi
winged bug
Join date: 12 Jan 2007
Posts: 180
09-12-2008 07:33
Moin Ordinal,

From: Ordinal Malaprop
You cannot actually connect to a database directly with LSL. The usual method is to write a web front-end, in PHP or what have you, which does all of your database work, and then send requests to that via the llHTTPRequest function. It then sends back the results, which you obtain from the http_response() event.


now Java is a bad bloat for that. Perl or PHP is much better suited as LSL server.

But lets think about embedding SQL into a webform. LSL sends the SQL command and authentication to it, and the form replys with SQL status and if there is a cursor. A 2nd form could then be used to retrieve data from the cursor. This would allow LSL/SQL.

ciao,Kephra
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
09-12-2008 09:39
You could certainly also do something like that, yes, send direct SQL queries (though you'd want to be very sure of your security). In practice, I find it a lot easier to have it as much as possible on the server, as it's simply more efficient to process any quantity of data that way, and just have LSL make a request and get the answer it needs in a form which means it has to do as little processing as possible.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names