Thema: TQuery

Einzelnen Beitrag anzeigen

arcon

Registriert seit: 8. Jun 2010
71 Beiträge
 
#1

TQuery

  Alt 22. Jun 2010, 10:35
Hallo miteinander,

ich habe eine tdatasource , eine adodataset und eine tquery komponente auf der form eingefügt.
habe soweit auch alles ordngungsgemäß eingerichtet ( sql-string, etc.) und will nun über einen button die query aufrufen ( query1.exec.sql ) .. jedoch kommt immer der fehler "invalide use of keyword token: ab zeile 2 "

also ausführenden sql text habe ich folgendes in das query eingefügt ..

SQL-Code:
CREATE TABLE [Set_Values_Watch_Master_Data](
   [Master_Data_ID] [int] IDENTITY(1,1) NOT NULL,
   [Process] [nvarchar](max) NULL,
   [Article] [nvarchar](max) NULL,
   [identifikation] [int] NULL,
   [means_of_Production] [nvarchar](max) NULL,
   [cost_Centre] [nvarchar](max) NULL,
   [Workstation_Number] [nvarchar](max) NULL,
   [Product] [nvarchar](max) NULL,
   [Number_Of_Charakters] [nvarchar](max) NULL,
   [WZ_Number] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_Master_Data] PRIMARY KEY CLUSTERED
(
   [Master_Data_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Set_Values_Watch_Access](
   [ACCESS_ID] [int] NOT NULL,
   [Provider] [nvarchar](max) NULL,
   [integraded_Security] [nvarchar](max) NULL,
   [Persist_Security_Info] [nvarchar](max) NULL,
   [Initial_Catalog] [nvarchar](max) NULL,
   [Data_Source] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_Access] PRIMARY KEY CLUSTERED
(
   [ACCESS_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Set_Values_Watch_User_Authentification](
   [ID_User] [int] NOT NULL,
   [Authentification] [bit] NULL,
   [User] [nvarchar](max) NULL,
   [Password] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_User_Authentification] PRIMARY KEY CLUSTERED
(
   [ID_User] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Set_Values_Watch_Param](
   [Param_ID] [int] NOT NULL,
   [Param_1] [nvarchar](max) NULL,
   [Param_2] [nvarchar](max) NULL,
   [Param_3] [nvarchar](max) NULL,
   [Param_4] [nvarchar](max) NULL,
   [Param_5] [nvarchar](max) NULL,
   [Param_6] [nvarchar](max) NULL,
   [Param_7] [nvarchar](max) NULL,
   [Param_8] [nvarchar](max) NULL,
   [Param_9] [nvarchar](max) NULL,
   [Param_10] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_Param] PRIMARY KEY CLUSTERED
(
   [Param_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE TABLE [dbo].[Set_Values_Watch_Workflow](
   [workflow_ID] [int] NOT NULL,
   [Text] [nvarchar](max) NULL,
   [Consigner] [nvarchar](max) NULL,
   [Consignee] [nvarchar](max) NULL,
   [Priority] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_Workflow] PRIMARY KEY CLUSTERED
(
   [workflow_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[Set_Values_Watch_Objects_Change_Log](
   [Index] [bigint] IDENTITY(1,1) NOT NULL,
   [Database_Name] [nvarchar](max) NOT NULL,
   [Log] [nvarchar](max) NULL,
 CONSTRAINT [PK_Set_Values_Watch_Objects_Change_Log] PRIMARY KEY CLUSTERED
(
   [Index] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

CREATE TABLE [dbo].[Set_Values_Watch_Machine_Data](
   [ID_Machine_Data] [int] NULL,
   [Cell_One] [bit] NULL,
   [Cell_Two] [bit] NULL
) ON [PRIMARY]
kann mir jemand rein zufällig helfen, wo der fehler liegt ?

danke

Geändert von mkinzler (22. Jun 2010 um 10:35 Uhr) Grund: Code-Tag durch SQL-Tag ersetzt
  Mit Zitat antworten Zitat