0

After setting up a database in SQL Server Compact 4.0 and when trying to add data with the 'Show table data' I get the following error

Executed SQL statement
SELECT Title, ID, Plot, Cast, Genre, Year, Rated, Length, Book, Page. Slot FROM DVD_List_12
Error Source: SQL Server Compact ADO.NET Data Provider
Error Message: There was an error parsing the query, ' [Token Line Number = 1,Token Line Offset = 29, Token in error = , ]'

The database table has 11 columns

Title   nvarchar  150   unique  no null   Key
ID      int         4   unique  no null   Auto increment
Plot    nvarchar  500           null
Cast    nvarchar  500           null     
Genre   nvarchar  150           null
Year    nchar       5           null
Length  nchar       4           null
Rated   nchar       6           null
Book    nchar       4           null
Page    nchar       4           null
Slot    nchar       4           null

I have no idea where this error is coming from, I've read through many of the previous questions available here regarding the parsing error but find nothing that helps with this specific problem.

Any help will be greatly appreciated.

Thanks

darby

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

If what you provided in your question is a verbatim copy the error is that you have a punctuation mark where there should be a comma at Page. Slot:

This:

SELECT Title, ID, Plot, Cast, Genre, 
Year, Rated, Length, Book, Page. Slot FROM DVD_List_12
                           ^^^^^^^^^^

should probably be Page, Slot

SELECT Title, ID, Plot, Cast, Genre,
Year, Rated, Length, Book, Page, Slot FROM DVD_List_12
                           ^^^^^^^^^^
jpw
  • 44,361
  • 6
  • 66
  • 86