Would like to know what im doing wrong. I can get the demo software to work from http://lessons.livecode.com/m/4071/l/70 ... l-database which uses im assuming an online server database at runrev.com......
minor EDIT... found on hostmonsters site
"When connecting to your database the hostname you will almost always use is localhost. The exception to this will be if the script or program you wish to connect to the database is running on a different system than the one hosted with Hostmonster, in which case the hostname will be host271.hostmonster.com"
So i changed tDatabaseAddress to host271.hostmonster.com from what i had before. Still no luck though
Code: Select all
local gConnectionID
on mouseUp
dbaseConnect
put revDataFromQuery(tab, cr, gConnectionID, "SELECT * FROM users ") into trData
dbaseDisconnect
answer trData
end mouseUp
on dbaseConnect
put "host271.hostmonster.com" into tDatabaseAddress
put "dbaseNaame" into tDatabaseName
put "dbaseUser" into tDatabaseUser
put "dbasePassword" into tDatabasePassword
put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
if tResult is a number then
put tResult into gConnectionID
else
put empty into gConnectionID
answer error "Unable to connect to the database"&cr&"Please check your IP address"
end if
end dbaseConnect
on dbaseDisconnect
revCloseDatabase gConnectionID
end dbaseDisconnect