Server Error in '/' Application.

Incorrect syntax near the keyword 'AND'.

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.SqlClient.SqlException: Incorrect syntax near the keyword 'AND'.

Source Error:


Line 139:            STRsql = STRsql & " AND  AuctionNo=" & STRauctionID
Line 140:            SA = New SqlDataAdapter(STRsql, objConn)
Line 141:            SA.Fill(DS1, "auction")
Line 142:            SA = Nothing
Line 143:            Try

Source File: C:\Domains\davidduggleby.com\www\live\auctions\imagedetails.aspx.vb    Line: 141

Stack Trace:


[SqlException (0x80131904): Incorrect syntax near the keyword 'AND'.]
   Microsoft.VisualBasic.CompilerServices.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags) +498
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure) +314
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn) +176
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn) +403
   shopping_product.Page_Load(Object sender, EventArgs e) in C:\Domains\davidduggleby.com\www\live\auctions\imagedetails.aspx.vb:141
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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