Esempio n. 1
0
        public void ConnectToData()
        {
            System.Data.Odbc.OdbcConnection conn =
                new System.Data.Odbc.OdbcConnection();
            // TODO: Modify the connection string and include any
            // additional required properties for your database.
            conn.ConnectionString = "Dsn=C4A;dbq=C:/USERS/WBEINHAU/DROPBOX/AUTOMATEN/C4A/C4A_DEMO_2/C4A_DEMO_2/APP_DATA/C4A_Ressources_3.accdb;driverid=25;fil=MS Access;";
            try
            {
                conn.Open();

                HyperLink4.Text = conn.GetSchema().ToString();

                // Process data here.
            }
            catch (Exception ex)
            {
                HyperLink4.Text = "Schnubbeldibums";
            }
            finally
            {
                conn.Close();
            }
        }