broken database link in tutorial

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

broken database link in tutorial

Post by magice » Tue Jul 08, 2014 7:48 pm

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.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: broken database link in tutorial

Post by Simon » Tue Jul 08, 2014 8:49 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: broken database link in tutorial

Post by Klaus » Tue Jul 08, 2014 8:52 pm

magice wrote:Unknown database "renrev_test"
:shock:

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: broken database link in tutorial

Post by sefrojones » Tue Jul 08, 2014 9:03 pm

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....

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: broken database link in tutorial

Post by LCNeil » Tue Jul 08, 2014 9:05 pm

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

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: broken database link in tutorial

Post by magice » Tue Jul 08, 2014 9:14 pm

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.

Post Reply