You are not logged in.
CREATE TABLE [Order Details] ([OrderID] INTEGER, [ProductID] INTEGER NOT NULL, [UnitPrice] REAL NOT NULL Default 0, [Quantity] INTEGER NOT NULL Default 1, [Discount] REAL NOT NULL Default 0, PRIMARY KEY ( [OrderID], [ProductID]))
20140325 14031617 srvr POST root/RemoteSQL.Execute/8 ERROR=500 (Exception ESQLite3Exception: near "Order": syntax error)
Why erorr when Field added "Default 1"
Offline
BTW, why are you execute such SQL from the client?
IMHO you should better:
- Either use the mORMot ORM, and let it create the table;
- Either use the SQL on the server side, with an explicit high-level service, i.e. switch to a SOA n-Tier architecture.
According to the error, you are trying to execute a MS SQL syntax with the SQLite3 driver.
Please select the appropriate connection type from the client.
I suspect you did not set the connection type, and stick to the default SQlite3 connection properties.
You can also try the command with SynDBExplorer and explicitly the MS SQL connection.
Offline
I run the example "16 - Execute SQL via services".
I copy the sample database "NorthWind.db" and the program "Server" then "Client" is executed.
When the "Client" runs, the form filled in as follows:
Egine: Sqlite 3 Server : NorthWind.db: User : Open
Database : NorthWind.db Password :
Select * from Order Details
Select * from: Order Details Execute
After Execute error occurs because there is a default, to another Table no problem as to: Orders, Customers, Employees.
Offline
As I suspected, you selected SQLite3 as engine.
Please use MS SQL instead!
Or perhaps NorthWind.db is a SQLIte3 database.
In this case, Sqlite3 as engine is correct, but your CREATE statement syntax is not correct: this is MSSQL dialect, and not SQlite3 dialect!
https://www.sqlite.org/lang_createtable.html
Offline
Sample database "NorthWind.db" is a SQLite database, how to open the "MS SQL" Engine?. With the "S qlite 3" Engine all table data can be displayed unless the "Order Details", because there is a default Field.
Database accessed by "Sqlite Manager" Add-ons Mozilla Firefox there is no problem.
Offline
Sqlite3 will never execute
CREATE TABLE [Order Details] ([OrderID] INTEGER, [ProductID] INTEGER NOT NULL, [UnitPrice] REAL NOT NULL Default 0, [Quantity] INTEGER NOT NULL Default 1, [Discount] REAL NOT NULL Default 0, PRIMARY KEY ( [OrderID], [ProductID]))
This is not its syntax.
Offline