Solved

SQLCE Create Multiple Table Error in query

Posted on 2011-03-13
2
791 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

785 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