I have the ff error and I have no idea what is

Line 1: Incorrect syntax near ','.
Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near ','.

Source Error:
Line 101: dgItems.SelectedItem.Cells[0].Text;
Line 102:
the application point the error in the ff line that fills in the dataset
Line 103: daDetails.Fill(dsDetails, "Products");
Line 104: dgDetails.DataSource = dsDetails;
Line 105: dgDetails.DataMember = "Products";

If u know what might be the reason please let me know

No I got the problem, those are actually the details of the error not my code, so thats not silly....

so the problem was that I was refering to the cell in my datagrid which was a buttoncolumn dgItems.SelectedItem.Cells[0].Text; add to cart actually, instead of productID cell which resides in cells[2]. I just thought that datagrid doesnt refer to button columns as cells and that was silly

Thanx hey

This question has already been answered. Start a new discussion instead.