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.

Update in OleDb

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe folgendes Problem:

Der einfache Update mit variablem Inhalt(status) erfolgt einfach nicht, doch wenn ich den update hardcodiere so wie angegeben dann funktioniert es.

Auf folgende dinge habe ich schon geachtet:

-Datenbank verbindung steht und Transaktionen können durchgeführt werden

-Der Paramatertyp ist der selbe wie in der Datenbank

-Die ApplicationOID ist in der Tabelle vorhanden

-dieser hardcodierte befehl funktioniert


public bool AcceptApplication(int applicationOID,int status )

    {

      bool ok = false;

      try

      {

        using (OleDbConnection oConnection = new OleDbConnection(connectionString))

        {

          using (OleDbCommand oCommand = new OleDbCommand())

          {

            oCommand.Connection = oConnection;

                                                          //status war hier der Paramter @status

            oCommand.CommandText = "UPDATE Termine SET Status = 3 WHERE ApplicationID = @applicationID";

            oCommand.Parameters.Add("@applicationID", OleDbType.Integer).Value = applicationOID;

            //oCommand.Parameters.Add("@status", OleDbType.UnsignedTinyInt).Value = status;

            oConnection.Open();

            int updateDone = oCommand.ExecuteNonQuery();

            if (updateDone > 0)

            {

              ok = true;

            }

            oConnection.Close();

          }

        }

      }

      catch (Exception ex)

      {

        System.Diagnostics.Trace.WriteLine("Error in \"AcceptApplication\": " + ex.Message);

      }

      return ok;

    }

Es wird kein Fehler geworfen sondern der update mit Parameter angabe wird nicht getätigt, updateDone bleibt auf 0.

danke schonmal im Vorraus für eure Hilfe

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.