Solved

SQLCE Create Multiple Table Error in query

Posted on 2011-03-13
2
789 Views
Last Modified: 2012-05-11
I have a C# application that connects to a SQL Compact 3.0 database and runs a SQL script which creates multiple tables. However it fails on line 16 which is the following
CREATE TABLE [COMP_SOC](

Open in new window

From this code:
CREATE TABLE [CLAIMOPSSCHED](
	[OFFICER] [nchar] (8) NOT NULL,
	[JOBNO] [int] NOT NULL,
	[ACTDATE] [datetime] NOT NULL,
	[CLAIMACT] [nchar] (6) NOT NULL,
	[DURATION] [int] NOT NULL,
	[NONCHRGFLG] [nchar] (1) NULL,
	[NONFSRFLG] [nchar] (1) NULL,
	[COMMENT] [nchar](100) NULL,
	[USERID] [nchar] (50) NULL,
	[CREATEDON] [datetime] NULL,
	[DISTANCE] [numeric] (10, 2) NULL
);


CREATE TABLE [COMP_SOC](
	[CODE] [nchar] (6) NOT NULL,
	[DESCRIPT] [nchar] (40) NOT NULL
);

Open in new window


The error message i get is:
There was an error parsing the query. [Token line number = 16, Token line offset = 1, Token in error = CREATE]
0
Comment
Question by:AVONFRS
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
AVONFRS earned 0 total points
ID: 35120358
I seem to have resolved this myself. I have just learned that you cannot execute batch queries with SQLCE.
0
 
LVL 1

Author Closing Comment

by:AVONFRS
ID: 35120361
Worked it out myself
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now