Hello
So I understand that SQLite is a localized within the application in writing. How do I switch to MySQL, as the application will need to connect to a server? How do I set this stuff up, I have no idear how to. Currently, I have a server rack running Ubuntu Linux distro 16.04. How do I switch from SQLite to MySQL?
Switching from sqlite to mySQL
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Switching from sqlite to mySQL
Hello Q,
Basically you need to do the following:
1) Install your MySQL Database service on a server in your network.
2) Add your Database and tables to the MySQL service.
Now you have Database name, Servername, IP Adress, portnumber, userID and User password to access the database.
3) Use this information with revOpenDatabase (see dictionary) to open the channel to the Database to use it in liveCode
Hope this helps,
Regards,
Paul
Basically you need to do the following:
1) Install your MySQL Database service on a server in your network.
2) Add your Database and tables to the MySQL service.
Now you have Database name, Servername, IP Adress, portnumber, userID and User password to access the database.
3) Use this information with revOpenDatabase (see dictionary) to open the channel to the Database to use it in liveCode
Code: Select all
put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
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
Regards,
Paul
Re: Switching from sqlite to mySQL
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w