jaymo Posted October 19, 2011 Share Posted October 19, 2011 I'm kind of a beginner to C#, I know the basics and little bit more and have been learning XNA. I have made a few small games which were very basic. I was just wondering if it is possible to pass information over from a game to say a mysql database? Is it even possible. As I wanted to be able to send scores etc over and retrieve them. Thanks James Quote Link to comment Share on other sites More sharing options...
bluegman991 Posted October 19, 2011 Share Posted October 19, 2011 There is a mysql add on for C#. Mysql with Visual Basic/C#/.NET/Powershell Quote Link to comment Share on other sites More sharing options...
Danny696 Posted October 19, 2011 Share Posted October 19, 2011 Are you sure you want to use MySQL with C#? Surley there are better purposely built databases for C#? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted October 20, 2011 Share Posted October 20, 2011 Use the mysql dot net connector: http://dev.mysql.com/downloads/connector/net/5.1.html Or if you want to use Linq use something like: http://www.devart.com/linqconnect/ I personally use LINQ exclusively since a year, much faster to develop, safer, and code lot more readable. Now if you want at any costs to have your C# code "chatting" with a PHP code, I would suggest to make a web service via PHP and call it from C# as C# have a full integrated solution for SOAP. You may want to check: http://php.net/manual/en/book.soap.php Quote Link to comment Share on other sites More sharing options...
Nickson Posted October 20, 2011 Share Posted October 20, 2011 In addition to what a_bertrand has said above. Make sure you know what you want to do! From reading the posts title, I get the impression that you want to pass things from the c#/xna code to php. While you speak of connecting to a mysql database in your topic.. These are two different things which have different solutions. Connecting to a mysql database is rather easy in .net, use the link a_bertrand provided. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted October 26, 2011 Share Posted October 26, 2011 I'm with a_b on that one. If you are hosting the database server at a remote location, the closest relatives to the database server should handle the communication to the database. Why? Assuming you are making a client with C# and the server with PHP, then the client could easily overlook what's being sent over the network. If you need to have a database on the clientside, I'd suggest a simple Flatfile db, or even access. The client could just periodically send the altered version of the database over to the server. This would, of course, come at a cost: less strain on the server and more secure, but there would be delays on the server side. Quote Link to comment Share on other sites More sharing options...
Nickson Posted October 26, 2011 Share Posted October 26, 2011 I wouldn't suggest to use flatfile or access on the client side, if you're working with .net you can just use the integrated datasets and data structures available. Quote Link to comment Share on other sites More sharing options...
Spudinski Posted October 26, 2011 Share Posted October 26, 2011 I wouldn't suggest to use flatfile or access on the client side, if you're working with .net you can just use the integrated datasets and data structures available. Ah, that would work as well. I just didn't know about that feature. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.