Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Error #700 - (Expected end of expression but instead found Create) |
Sat, Aug 7 2010 10:33 PM | Permanent Link |
John Evans | Hi,
I am trying to follow the example of the CDCollector demo for creating tables at application start up if they don't exist. The database gets created successfully but when I run table code I am getting the follow error: 'ElevateDB error #700. An error was found in the statement at line 2 column 1 (Expected end of expression but instead found Create). ---------------- with CatalogQuery do begin SQL.Text := 'SELECT * FROM Information.Tables WHERE Name=''tblFred'''; Open; if (RecordCount = 0) then begin Close; SQL.Add('CREATE TABLE "tblFred"'); SQL.Add('('); SQL.Add('"fRef" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1000, INCREMENT BY 1),'); SQL.Add('"fDate" VARCHAR(10) COLLATE "ANSI",'); SQL.Add('"fTime" VARCHAR(10) COLLATE "ANSI",'); SQL.Add('"fAmPm" VARCHAR(10) COLLATE "ANSI",'); SQL.Add('"fEvent" VARCHAR(20) COLLATE "ANSI",'); SQL.Add('"fScript" VARCHAR(10) COLLATE "ANSI",'); SQL.Add('"fTask" VARCHAR(20) COLLATE "ANSI",'); SQL.Add('"fTrimmed" INTEGER DEFAULT 0,'); SQL.Add('CONSTRAINT "PrimaryKey" PRIMARY KEY ("fRef")'); SQL.Add('('); SQL.Add('DESCRIPTION ''Import Fred Log File'''); ExecSQL; end else Close; ------------------ Thanks John |
Sat, Aug 7 2010 11:13 PM | Permanent Link |
Charles Tyson | Don't you need to SQL.Clear after the Close statement, to delete the
SELECT command? On 8/7/2010 7:33 PM, John Evans wrote: > Hi, > > I am trying to follow the example of the CDCollector demo for creating tables at application start up if they don't exist. > > > The database gets created successfully but when I run table code I am getting the follow error: > > 'ElevateDB error #700. An error was found in the statement at line 2 column 1 (Expected end of expression but instead found Create). > > ---------------- > with CatalogQuery do > begin > SQL.Text := 'SELECT * FROM Information.Tables WHERE Name=''tblFred'''; > Open; > if (RecordCount = 0) then > begin > Close; > SQL.Add('CREATE TABLE "tblFred"'); > SQL.Add('('); > SQL.Add('"fRef" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1000, INCREMENT BY 1),'); |
Sat, Aug 7 2010 11:13 PM | Permanent Link |
Charles Tyson | Don't you need to SQL.Clear after the Close statement, to delete the
SELECT statement? On 8/7/2010 7:33 PM, John Evans wrote: > Hi, > > I am trying to follow the example of the CDCollector demo for creating tables at application start up if they don't exist. > > > The database gets created successfully but when I run table code I am getting the follow error: > > 'ElevateDB error #700. An error was found in the statement at line 2 column 1 (Expected end of expression but instead found Create). > > ---------------- > with CatalogQuery do > begin > SQL.Text := 'SELECT * FROM Information.Tables WHERE Name=''tblFred'''; > Open; > if (RecordCount = 0) then > begin > Close; > SQL.Add('CREATE TABLE "tblFred"'); > SQL.Add('('); > SQL.Add('"fRef" INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1000, INCREMENT BY 1),'); |
Sat, Aug 7 2010 11:14 PM | Permanent Link |
Charles Tyson | This message was cancelled from within Mozilla Thunderbird.
|
Sun, Aug 8 2010 12:10 AM | Permanent Link |
John Evans | ..correct some syntax but still having same error
john |
Sun, Aug 8 2010 12:20 AM | Permanent Link |
John Evans | Thanks. Clear solved the problem.
|
This web page was last updated on Thursday, September 26, 2024 at 10:04 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |