2010-02-18 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / AccessDataSource.cs
index 486070871fcee315a39c6d0c239d4cbee96ec6fa..eebd3826d5f099e15ec5ab5888a75d8c3d20ae7e 100644 (file)
@@ -47,7 +47,7 @@ namespace System.Web.UI.WebControls {
                const string PROVIDER_NAME = "System.Data.OleDb";
                const string PROVIDER_STRING = "Microsoft.Jet.OLEDB.4.0";
 
-               string dataFile;
+               //string dataFile;
                string connectionString;
 
                public AccessDataSource () : base ()
@@ -58,27 +58,21 @@ namespace System.Web.UI.WebControls {
                public AccessDataSource (string dataFile, string selectCommand) : 
                        base (String.Empty, selectCommand)
                {
-                       this.dataFile = dataFile;
+                       //this.dataFile = dataFile;
                        this.ProviderName = PROVIDER_NAME;
                }
 
                protected override SqlDataSourceView CreateDataSourceView (string viewName)
                {
                        AccessDataSourceView view = new AccessDataSourceView (this, viewName, this.Context);
-                       view.DataSourceViewChanged += new EventHandler (ViewChanged);
                        if (IsTrackingViewState)
                                ((IStateManager) view).TrackViewState ();                               
                        return view;
                }
 
-               void ViewChanged (object source, EventArgs e)
-               {
-                       RaiseDataSourceChangedEvent (e);
-               }
-
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                [Browsable (false)]
-               [MonoTODO]
+               [MonoTODO("AccessDataSource does not support SQL Cache Dependencies")]
                public override string SqlCacheDependency {
                        get { throw new NotSupportedException ("AccessDataSource does not supports SQL Cache Dependencies."); }
                        set { throw new NotSupportedException ("AccessDataSource does not supports SQL Cache Dependencies."); }
@@ -104,8 +98,7 @@ namespace System.Web.UI.WebControls {
                public override string ConnectionString {
                        get {
                                if (connectionString == null) {
-                                       connectionString = String.Format ("Provider={0}; Data Source={1}",
-                                                                         PROVIDER_STRING, GetPhysicalDataFilePath ());
+                                       connectionString = String.Concat ("Provider=", PROVIDER_STRING, "; Data Source=", GetPhysicalDataFilePath ());
                                }
 
                                return connectionString;