I'm trying to write a multiplayer game (a bit like a MMORPG) where the client software (C#) connects to a central database (MS Access DB on a IIS webserver) to validate login details.
I've uploaded the testdb.mdb to my webserver, then using this code:
The code fails - says 'Exception Details: System.Data.OleDb.OleDbException: Not a valid file name.'
If this is fundamentally not possible, could I use a mysql database? Again I think I'd have similar problems as web hosting isn't meant for hosting a database is it - unless its used locally by the web pages?
Thanks for any tips on how I can do this!
I've uploaded the testdb.mdb to my webserver, then using this code:
Code:
string targetdb = "http://www.mywebspace.com/testdb.mdb";
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + targetdb;
OleDbConnection myConnection = new OleDbConnection( connectionString );
myConnection.Open();
string query = "insert into tbl_users (username, password) VALUES ('john', 'test');
OleDbCommand myCommand = new OleDbCommand();
myCommand.CommandText = query;
myCommand.Connection = myConnection;
myCommand.ExecuteNonQuery();
myConnection.Close();
The code fails - says 'Exception Details: System.Data.OleDb.OleDbException: Not a valid file name.'
If this is fundamentally not possible, could I use a mysql database? Again I think I'd have similar problems as web hosting isn't meant for hosting a database is it - unless its used locally by the web pages?
Thanks for any tips on how I can do this!