Server Error in '/' Application.

Syntax error (missing operator) in query expression 'NazevBezDiak='Hotel D'Angelo' and MistoLink = 'Praha''.

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: Syntax error (missing operator) in query expression 'NazevBezDiak='Hotel D'Angelo' and MistoLink = 'Praha''.

Source Error:


Line 288:        dbconn.Open()
Line 289:        dbcomm = New OleDbCommand(sql, dbconn)
Line 290:        dbread = dbcomm.ExecuteReader()
Line 291:
Line 292:        Dim connetionString As String

Source File: C:\www\hosting\LocalUser\hotelpension.cz\HotelContent.aspx.vb    Line: 290

Stack Trace:


[OleDbException (0x80040e14): Syntax error (missing operator) in query expression 'NazevBezDiak='Hotel D'Angelo' and MistoLink = 'Praha''.]
   Microsoft.VisualBasic.CompilerServices.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags) +183
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +290
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +1283448
   HotelContent.Page_Load(Object sender, EventArgs e) in C:\www\hosting\LocalUser\hotelpension.cz\HotelContent.aspx.vb:290
   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.4087.0