Page 1 of 1

broken database link in tutorial

Posted: Tue Jul 08, 2014 7:48 pm
by magice
I was looking for a good tutorial on using LC to create a front end for a mySQL database. I came across this page. http://lessons.runrev.com/m/4071/l/7003 ... l-database Unfortunately I can't seem to connect to the test database as i keep getting the error "Unknown database "renrev_test". Has this database been completely removed, or has the location changed with the LC name change? I have tried changing the location to livecode.com, but that didn't work.

Re: broken database link in tutorial

Posted: Tue Jul 08, 2014 8:49 pm
by Simon
Hi magcie,
I think I came across this months ago.
put "runrev_test" into tDatabaseName
put "runrev_example" into tDatabaseUser
They should be both the same not sure which one is correct.

Simon
Edit err... both runrev_test or runrev_example

Re: broken database link in tutorial

Posted: Tue Jul 08, 2014 8:52 pm
by Klaus
magice wrote:Unknown database "renrev_test"
:shock:

Re: broken database link in tutorial

Posted: Tue Jul 08, 2014 9:03 pm
by sefrojones
I just tested This code from the tutorial:

Code: Select all

on mouseUp
    -- use a global variable to hold the connection ID so other scripts can use it
    global gConnectionID
    
    -- set up the connection parameters - edit these to suit your database
    put "runrev.com" into tDatabaseAddress
    put "runrev_test" into tDatabaseName
    put "runrev_example" into tDatabaseUser
    put "example" into tDatabasePassword
    
    -- connect to the database
    put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
    
    -- check if it worked and display an error message if it didn't
    -- & set the connection ID global
    if tResult is a number then
        put tResult into gConnectionID
        answer info "Connected to the database." & cr & "Connection ID = " & gConnectionID
    else
        put empty into gConnectionID
        answer error "Unable to connect to the database:" & cr & tResult
    end if
end mouseUp
and got a connection ID....

Re: broken database link in tutorial

Posted: Tue Jul 08, 2014 9:05 pm
by LCNeil
Hi all,

Thanks for letting us know about this issue

It looks like the database has been erased (possibly during the move to livecode.com). I now have re-created the Database, so the scripts in the lesson should work as expected :)

Kind Regards,


Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com

Re: broken database link in tutorial

Posted: Tue Jul 08, 2014 9:14 pm
by magice
runrevneil wrote:Hi all,

Thanks for letting us know about this issue

It looks like the database has been erased (possibly during the move to livecode.com). I now have re-created the Database, so the scripts in the lesson should work as expected :)

Kind Regards,


Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
You guys are awesome.