Tony Wu
Tony Wu

Reputation: 329

Error Inserting Data Into SQL Compact

I want to insert this piece of data into SQL Compact 3.5 using the following code

INSERT INTO [[2 Letter Words]] ([Word],[Melted]) VALUES (N'AA',N'AA');

But I'm getting this error

Error Code: 80040E14
Message   : There was an error parsing the query. [ Token line number = 1,Token line offset = 39,Token in error = , ]
Minor Err.: 25501
Source    : SQL Server Compact ADO.NET Data Provider
Num. Par. : 1
Num. Par. : 39
Err. Par. : ,

What's wrong? Any help will be appreciated!

Upvotes: 0

Views: 2005

Answers (2)

agent-j
agent-j

Reputation: 27933

Sql Server onlys likes a single set of brackets in [Table Name with spaces].

 INSERT INTO [2 Letter Words] ([Word],[Melted]) VALUES (N'AA',N'AA'); 

Upvotes: 1

Gabriel
Gabriel

Reputation: 969

Try removing the doble "[ ]" in table's name.

INSERT INTO [2 Letter Words] ([Word],[Melted]) VALUES (N'AA',N'AA');

Upvotes: 1

Related Questions