Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ACCESS: Passwort ändern via C#

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

ich würde gern aus meinem C# Programm heraus das Passwort einer Access-Datenbank ändern.

Bei MySQL z.B. gibt es ja ein Statement, was genau dies kann.

UPDATE user SET Password="XXX" WHERE user='root';

Für Access habe ich bei Google jedoch nichts passendes gefunden.

Kennt sich da jemand aus?

Verwende das Access 2007 Dateiformat accdb und eine OleDB-Verbindung.

Vielen Dank schonmal im voraus!

Luk

  • Autor

Ich habe inzwischen selbst noch eine Lösung gefunden:


OleDbConnection objOleDbConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Sample.mdb; Mode=12");

objOleDbConnection.Open();

OleDbCommand objOleDbCommand = objOleDbConnection.CreateCommand();

objOleDbCommand.CommandText = "ALTER DATABASE PASSWORD [newpw] []";

objOleDbCommand.ExecuteNonQuery();

objOleDbConnection.Close();

Quelle: ALTER USER or DATABASE Statement (Microsoft Access SQL) [Access 2007 Developer Reference]

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.