Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQLCE Create Multiple Table Error in query

Posted on 2011-03-13
2
Medium Priority
?
799 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
Progress

609 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