The following code is throwing the following error message (C#Microsoft Visual Studio). Any help with what I am doing wrong withthis code would be appreciated:
Error: UnsuccessfulSytem.Data.SqlClient.SqlException(0x80131904): Incorrect syntax near the keyword ‘ON’.
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using Acme.Data_Access_Layer;
using Acme.Business_Layer;
namespace Acme
{
public partial class frmSalesView : Form
{
public frmSalesView()
{
InitializeComponent();
}
private void DisplaySales()
{
string selectQuery;
selectQuery = “SELECT Sales.SalesID, Customers.CustomerID,Products.ProductID, Sales.Payable, “;
selectQuery = selectQuery + “Sales.StartDate “;
selectQuery = selectQuery + “FROM Sales INNER JOIN “;
selectQuery = selectQuery + “Customers ON Sales.CustomerID =Customer.CustomerID,”;
selectQuery = selectQuery + “Products ON Sales.ProductID =Products.ProductID”;
selectQuery = selectQuery + ” ” +GlobalVariables.salesSearchCriteria;
SqlConnection conn =ConnectionManager.DatabaseConnection();
SqlDataReader rdr = null;
try
{
conn.Open();
SqlCommand cmd =
PayPal Gateway not configured
PayPal Gateway not configured