Solved

SQLCE Create Multiple Table Error in query

Posted on 2011-03-13
2
793 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Format Date fields 11 62
C# LINQ 5 41
c#, datatable, aspx 4 48
msiexec won't run 4 24
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

732 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