lundi 9 février 2015

connect database to appharbor mvc web application

I'm new to appharbor and databases in general. I created a barebones app with the mvc template in visual studio, and successfully connected it to an SQLite database (locally). However, I know it's not recommended to add the database file when I upload it to appharbor, so I commented out all the lines involving the database and removed it. It was successfully uploaded to appharbor, but now I'd like to get the database connection back. I have all the necessary information (I chose the free MySQL server) like the connection string, but I don't know where to put it in the app, or what it should look like.


Locally, it was as simple as the following code:



m_dbConnection = new SQLiteConnection(@"Data Source=|DataDirectory|\test.db;Version=3;")


I'm just not sure how it would work with appharbor- any suggestions?


Aucun commentaire:

Enregistrer un commentaire