using on-rev's database problem
Posted: Sat Sep 08, 2012 11:37 pm
Getting an error message when I try to connect to a datbase I created n on-rev.
HEre is the code I try to connect with some commets to help you help me debug it
I get the error:
Access denied for user 'human_tutor'@<domainname removed be me so I can post this>t' (using password: YES)
I know that username exists, and I have the pw for it... I am thinking I am not identifying the DB properly within on-rev... anyone else have a sample script that works wth on-rev.
Thanks,
-Nick
HEre is the code I try to connect with some commets to help you help me debug it
Code: Select all
on preOpenCard
-- This opens the connection to the database and makes sure no problems exist
-- the forum will not let me upload and urls so I replaced the . below with (dot)
put "thor(dot)on-rev(dot)com" into gDBHost --the domain with the cpanel I created the SQL
put "mypassword" into gDBPassWord
put "human_tutor" into gDBUserName --the username I created for this db
databaseConnect("humansiz_test") --the name of the db I created
-- Show the first available record:
goNext 0
if the result is not empty then
-- database exception handling goes here
end if
end preOpenCard
on databaseConnect tDB
-- this only works with Mysql
get revOpenDatabase("mysql", gDBHost, tDB, gDBUserName, gDBPassWord)
if it is not an integer then
error "Could not connect to database:" && it
end if
put it into sDatabaseId
end databaseConnect
Access denied for user 'human_tutor'@<domainname removed be me so I can post this>t' (using password: YES)
I know that username exists, and I have the pw for it... I am thinking I am not identifying the DB properly within on-rev... anyone else have a sample script that works wth on-rev.
Thanks,
-Nick