I am trying to connect a windows phone 7 app to MySQL database at a PC.
From what I found out after lots of searching, there is no direct way to do so. There is a lot of people saying restsharp could help communicating, but there seems to be very few info regarding the success and ways to do so.
I need to get the wp7 app to send data into MySQL db, so a website could take the data sent into the db and display it out.
Any kind people willing to give me some guidance or direct me to a known guide?
Thanks in advance
Typical way to do it is to setup your own website (better to be password protected, and over SSL). Then you use REST or simply HTTP POST to pass the data to your web scripts, which in turn connect to MySQL and do actual data INSERT.
Related
I'm looking to start a small application for maintenance techs to view production status of lines and whether they are running or currently throwing an error.
Essentially when a user keys in that the line is experiencing problems it will pass a value to the DB we have. The IOS app should be able to read the data from the table as to take it and then create visual warnings for techs to access view through the app. An example of this would be a small Green/Red Square representing the current status of a line
Does Xamarin.IOS support this via an ODBC connection? I have done some preliminary searches for accessing the data through a web server but I am not quite how this would be implemented.
Any help would be appreciated - Cheers,
It is better if you can write a separate backend server application to deal with DB. Expose that server through the Restful Web API and then access that Web API from the Mobile app. If you are planning to use an in-app local database, then you can write DB service with SQLite. Refer below link
https://github.com/praeclarum/sqlite-net
Assume that I have a third-party database application with SDK that can be used to retrieve data out of the database in XML.
On the other side, I have developed a website using Laravel framework of PHP. The website is supposed to display data from the database of the application.
In regards to above I have the following questions:
As far as I understand, I can either store the requested data in my website database or just show it without storing. What technique do you suggest?
How do I achieve xml data transfer from the database server to the website?
Taking into account that I have experience of development in C#, I assume that I have to develop some web-service that would run on the database server, retrieve the required data and send it to my website. So the web-service has to receive the requests from my Laravel website, retrieve data from database server accordingly and pass the xml response to my website that would finally display it. Am I on the right way? If so, could you please guide me on how to code and bind these parts?
Thank you in advance.
I have to agree with #Serge in the comments - there are many ways to do this because it is a very broad question.
My answer was mostly going to deal with how regularly the third party database was going to be updated but judging from your comments, I'm assuming it will be fairly often? In which case, I would likely connect directly to the third party database from your laravel app using the firebird driver found here: https://github.com/jacquestvanzuydam/laravel-firebird (Please note, I have never used this so I cannot comment on it's quality) instead of writing a C# web service. I don't know much about firebird itself but you will likely want to connect using an SSH tunnel or VPN for security reasons.
Then I would either store data in MySQL if you know it isn't likely to change very often (in this case you would use a laravel command, run on a schedule, to pull data out of firebird every [X] days/hours/minutes depending on the data) or, if the data is likely to change on each potential web request, using some form of caching system (redis, memcache, file cache etc) to speed up the web requests.
Sorry if that isn't particularly helpful - if you can provide more information maybe I can help you out further :)
Good luck!
I've just installed MySQL with phpmyadmin on my VPS via ssh protocol, and I've created root account with all privileges. I figured out how to connect with my databases via C# using MySQL 5.5v. for .Net 2.0 - the only version acceptable for Unity3D. And I have a few questions about it. I don't know is it right to connect to database on client side with root account, i mean something like that: Server=***;Database=Users;Uid=root;Pwd=***;
and then type query: SELECT * FROM Users where .... i think its unsafe way. How can I connect do it in more safety way? Without giving Password to Root account in C# code, maybe create another account without modify permissions?
It's not a good idea to connect to the database from the client(Unity), if this app will be released anywhere on the internet. The way to do this to use POST or GET method with the help of the WWW class, to send and receive information your server.
Your server should be coded with php,perl, c++ or whatever language you prefer.It will read data you send from Unity, then retrieve information from database and send it back to the client(Unity). Again, the whole database connection should be done on the server not on the client side.
One exception to this is when your app will only be used in your company office. As long as it will be made available for others to download, it is not secure if you hard-code the login information or even allow direct connect to the database from the client side. There are many examples on Unity wiki website.
Ok I have searched and searched for an answer to my problem but can not find a direct answer.
Can someone please guide me in the direction I need to go with step by step solution somewhere that is useful?
My Question:
I built an Windows 8.1 Metro Application that needs to pull data and store data into a database I am hosting in MySQL online but I can not use things like My.SQL.Data.RT because it is not supported (I guess) because I get an error.
How do I connect to my online database to pull information from and store information to it? If I can not do this what options do I have?
Using local databases is not an option because everyone will be storing information in the database and pulling information from it from hundreds of different computers running the application.
If you could point me to a website that I can see it in step by step and please. I am using C#.
Thank you for your help. I have been racking my brain over this because the My.SQL.Data.RT works but the application fails to pass the Windows Store requirements with it pretty dumb if you ask me.
I'm not a Windows 8 store app developer so I am just trying to give suggestions.
From what I know, connecting directly to database server over internet from a client app is NOT A GOOD PRACTICE nowadays. Instead, people provide APIs to do it.
For example, Twitter provides restful APIs, so twitter clients can request http urls and get wanted data in JOSN format. The security of the the connection is ensured by oAuth (so that you don't transfer username and password in http request) and SSL/HTTPS.
In this way, the database connection is hidden from Internet. You will also benefit from the API layer if you want to develop another client on platforms other than Windows, e.g. iOS or Android.
By a quick google search, I found two guides about making a restful api with C#.
http://www.codeproject.com/Articles/112470/Developing-a-REST-Web-Service-using-C-A-walkthroug
http://www.asp.net/web-api/tutorials/hands-on-labs/build-restful-apis-with-aspnet-web-api
I am struggling to figure out how to connect to a MySql database in my C# Windows Phone 8 application like I can on my desktop application. The reason I am struggling is because it seems I cannot just use the same MySql.Data library that I used on my desktop application. Are there any other libraries that I can use to access my database?
PS. I really don't want to go the PHP route because I will have to have Apache running on y server two and will have to add JSON interfacing two which will not only be a hassle but possibly also waste some processing time and make my application more complex.
PPS. If not possible with MySql, can it be made to work with Microsoft SQL Server or Azure?
EDIT:
If some sort of HTTP interface is my only option, is there some easy existing API or something that I can use to allow SQL data transmission or will I have to create specific PHP(/asp.net or whatever) code for each type request that I am planning to send?