Hej igen,
Her er en model som virker: (c#)
// using
using System.Data;
using System.Data.OleDb;
// Create Connection object
OleDbConnection dbConn = new OleDbConnection(GetConnectionString());
OleDbCommand dbComm = new OleDbCommand("Select * from Internet", dbConn);
// Open Connection
dbConn.Open();
dbComm.ExecuteNonQuery();
dbConn.Close();
// Og så metoden som returnerer strengen
// Generates database connection string
private string GetConnectionString()
{
return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("log/database.mdb") + ";";
}
Venligst
Arne Johansen
http://www.frameworker.net