Server Error in '/' Application.

Datentypenkonflikt in Kriterienausdruck.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Datentypenkonflikt in Kriterienausdruck.

Source Error:


Line 165:        If i = 0 Then
Line 166:            cmd.CommandText = "Insert into Warenkorb (SessionNR, KZ, FreierText, Wert, Datum) values ('" + Session_ID + "', 'D', '" + Label1.Text + "', '" + xNR + "', '" + xDatum + "')"
Line 167:            cmd.ExecuteNonQuery()
Line 168:        Else
Line 169:            cmd.CommandText = "Update Warenkorb Set FreierText = '" + Label1.Text + "', Wert= " + xNR + " Where SessionNR= '" + Session_ID + "' and KZ= 'D'"

Source File: C:\inetpub\wwwroot\Classic\DistributorDirekt.aspx.vb    Line: 167

Stack Trace:


[OleDbException (0x80040e07): Datentypenkonflikt in Kriterienausdruck.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1233516
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +208
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +162
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +107
   DistributorDirekt.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\Classic\DistributorDirekt.aspx.vb:167
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4081.0