First of all you have to “Setting up an Access Database for Your Hosting Account” for online availability of “Access Database” as a centralized.
If your hosting is with godaddy then visit this Link
Here is a sample code of access online “Access Database”
string connectionString =
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source="Path of you hosting provider database";" +
@"User Id= "hosting db user id];Password=[hosting db password";";
string queryString = "SELECT Foo FROM Bar";
using (OleDbConnection connection = new OleDbConnection(connectionString))
using (OleDbCommand command = new OleDbCommand(queryString, connection))
{
try
{
connection.Open();
OleDbDataReader reader = command.ExecuteReader();
while (reader.Read())
{
Console.WriteLine(reader[0].ToString());
}
reader.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
for more visit this link, hope this will help you.
1
solved How to connect c# windows application with online access database [closed]