Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Compact - Error executing multiple insert statements

I'm using management studio to connect to my sql mobile/compact database.

I'm trying to insert some dummy data into some tables, for example:

INSERT INTO FlooringTypes (FlooringType) VALUES ('Carpet')  
INSERT INTO FlooringTypes (FlooringType) VALUES ('Smooth')

However it returns the error:

Major Error 0x80040E14, Minor Error 25501

If I run them seperately it works fine.

like image 631
Peter C Avatar asked Jun 09 '26 18:06

Peter C


2 Answers

Put GO between them. I think SQL CE doesn't handle batches.

like image 100
Rob Farley Avatar answered Jun 11 '26 12:06

Rob Farley


The first will work by adding a semi colon after each line (excluding the last line).

INSERT INTO FlooringTypes (FlooringType) VALUES ('Carpet');   
INSERT INTO FlooringTypes (FlooringType) VALUES ('Smooth')
like image 43
John Doherty Avatar answered Jun 11 '26 12:06

John Doherty