SQL

Last post 10-21-2010, 8:47 PM by Adam. 2 replies.
Sort Posts: Previous Next
  •  08-30-2006, 7:48 PM 22224

    SQL

    when i import the sql i get this
     
     
     localhost   cutechat
    Error
    SQL query: 
    IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[Roles]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[Roles]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[UserRole]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[UserRole]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[Users]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[Users]GO CREATE TABLE [dbo].[Roles](
    [RoleName][nvarchar]( 64 ) NOT NULL ,
    [IsSystemReserved][bit] NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[UserRole](
    [Username][nvarchar]( 64 ) NOT NULL ,
    [RoleName][nvarchar]( 64 ) NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[Users](
    [Username][nvarchar]( 64 ) NOT NULL ,
    [ PASSWORD ][nvarchar]( 64 ) NOT NULL ,
    [Age][int] NULL ,
    [Location][nvarchar]( 100 ) NULL ,
    [Occupation][nvarchar]( 100 ) NULL ,
    [Interests][nvarchar]( 100 ) NULL ,
    [Gender][bit] NULL ,
    [LastLoginTime][datetime] NOT NULL ,
    [DateCreated][datetime] NOT NULL
    ) ON [ PRIMARY ]GO IF NOT EXISTS (
    SELECT Rolename
    FROM Roles
    WHERE Rolename = 'Admins'
    )
    INSERT INTO Roles( RoleName, IsSystemReserved )
    VALUES (
    'Admins', 1
    )
    IF NOT
    EXISTS (
    SELECT Rolename
    FROM Roles
    WHERE Rolename = 'Members'
    )
    INSERT INTO Roles( RoleName, IsSystemReserved )
    VALUES (
    'Members', 1
    )
    IF NOT
    EXISTS (
    SELECT Username
    FROM Users
    WHERE Username = 'Admin'
    )
    INSERT INTO Users( Username, [
    PASSWORD ], Age, Gender, Location, Occupation, LastLoginTime, DateCreated )
    VALUES (
    'Admin', 'admin', 35, 1, 'Ontatio, Canada', 'Web Developer', GetDate(
    ), GetDate(
    )
    )
    IF NOT
    EXISTS (
    SELECT Username
    FROM UserRole
    WHERE Username = 'Admin'
    AND RoleName = 'Admins'
    )
    INSERT INTO UserRole( Username, Rolename )
    VALUES (
    'Admin', 'Admins'
    )
    IF NOT
    EXISTS (
    SELECT Username
    FROM UserRole
    WHERE Username = 'Admin'
    AND RoleName = 'Members'
    )
    INSERT INTO UserRole( Username, Rolename )
    VALUES (
    'Admin', 'Members'
    )
    IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatBadWord]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatBadWord]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatChannel]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatChannel]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatClient]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatClient]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatConfig]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatConfig]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatCustomItem]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatCustomItem]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatFile]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatFile]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatIPRule]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatIPRule]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatInstantMessage]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatInstantMessage]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatLobby]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatLobby]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatMessage]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatMessage]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatQueueItem]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatQueueItem]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatRelation]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatRelation]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatTempStateLog]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatTempStateLog]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteChatUser]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteChatUser]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportCustomer]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportCustomer]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportFeedback]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportFeedback]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportLog]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportLog]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportNote]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportNote]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportOperator]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportOperator]GO IF EXISTS (
    SELECT *
    FROM dbo.sysobjects
    WHERE id = object_id(
    N '[dbo].[CuteSupportSession]'
    )
    AND OBJECTPROPERTY(
    id, N 'IsUserTable'
    ) =1
    )
    DROP TABLE [dbo].[CuteSupportSession]GO CREATE TABLE [dbo].[CuteChatBadWord](
    [BadWordId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [BadWord][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [MatchType][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatChannel](
    [ChannelId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [Location][nvarchar]( 50 ) NOT NULL ,
    [LocationId][int] NOT NULL ,
    [BeginTime][datetime] NOT NULL ,
    [ActiveTime][datetime] NOT NULL ,
    [Locked][bit] NOT NULL ,
    [KickedUsers][ntext] NOT NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatClient](
    [ClientId][uniqueidentifier] NOT NULL ,
    [Location][nvarchar]( 50 ) NOT NULL ,
    [ChannelId][int] NOT NULL ,
    [LocationId][int] NOT NULL ,
    [IPAddress][nvarchar]( 50 ) NULL ,
    [Software][nvarchar]( 50 ) NOT NULL ,
    [InstantTargetUserId][int] NOT NULL ,
    [IsAdmin][bit] NULL ,
    [BeginTime][datetime] NOT NULL ,
    [ActiveTime][datetime] NOT NULL ,
    [UserId][int] NOT NULL ,
    [DisplayName][nvarchar]( 50 ) NOT NULL ,
    [OnlineStatus][nvarchar]( 20 ) NOT NULL ,
    [AnonymousPubicProperties][ntext] NULL ,
    [AnonymousPrivateProperties][ntext] NULL ,
    [CurrentWorkXml][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatConfig](
    [ConfigName][nvarchar]( 100 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [ConfigValue][ntext] COLLATE Latin1_General_CI_AS NOT NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatCustomItem](
    [ItemId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [ItemType][nvarchar]( 50 ) NOT NULL ,
    [ItemIndex][nvarchar]( 50 ) NOT NULL ,
    [Short1][nvarchar]( 50 ) NULL ,
    [Short2][nvarchar]( 50 ) NULL ,
    [Short3][nvarchar]( 50 ) NULL ,
    [Short4][nvarchar]( 50 ) NULL ,
    [Long1][nvarchar]( 1000 ) NULL ,
    [Long2][nvarchar]( 1000 ) NULL ,
    [ItemText][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatFile](
    [FileId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [DownloadId][uniqueidentifier] NOT NULL ,
    [UserId][int] NOT NULL ,
    [DisplayName][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [FileTime][datetime] NOT NULL ,
    [FileName][nvarchar]( 255 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [FileMine][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [FileSize][int] NOT NULL ,
    [FileData][image] NOT NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatIPRule](
    [RuleId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [Sort][int] NOT NULL ,
    [IPExpression][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Operate][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatInstantMessage](
    [MessageId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [MessageTime][datetime] NOT NULL ,
    [Scope][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [MessageType][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Location][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [ChannelId][int] NOT NULL ,
    [LocationId][int] NOT NULL ,
    [SenderUserId][int] NOT NULL ,
    [SenderDisplayName][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [TargetUserId][int] NULL ,
    [TargetDisplayName][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NULL ,
    [Whisper][bit] NULL ,
    [Bold][bit] NULL ,
    [Italic][bit] NULL ,
    [Underline][bit] NULL ,
    [FontColor][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [FontName][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [FontSize][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [MessageText][nvarchar]( 2000 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [MessageHtml][ntext] COLLATE Latin1_General_CI_AS NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatLobby](
    [LobbyId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [Name][nvarchar]( 50 ) NOT NULL ,
    [Description][nvarchar]( 200 ) NOT NULL ,
    [Announcement][nvarchar]( 2000 ) NULL ,
    [IsPublic][bit] NOT NULL ,
    [IsEnable][bit] NOT NULL ,
    [IsHidden][bit] NOT NULL ,
    [Authenticate][bit] NOT NULL ,
    [AllowAnonymous][bit] NOT NULL ,
    [ PASSWORD ][nvarchar]( 50 ) NULL ,
    [Integration][nvarchar]( 50 ) NULL ,
    [ManagerList][nvarchar]( 1000 ) NOT NULL ,
    [MaxOnlineCount][int] NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatMessage](
    [MessageId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [MessageTime][datetime] NOT NULL ,
    [Scope][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [MessageType][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Location][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [ChannelId][int] NOT NULL ,
    [LocationId][int] NOT NULL ,
    [SenderUserId][int] NOT NULL ,
    [SenderDisplayName][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [TargetUserId][int] NULL ,
    [TargetDisplayName][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NULL ,
    [Whisper][bit] NULL ,
    [Bold][bit] NULL ,
    [Italic][bit] NULL ,
    [Underline][bit] NULL ,
    [FontColor][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [FontName][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [FontSize][nvarchar]( 20 ) COLLATE Latin1_General_CI_AS NULL ,
    [MessageText][nvarchar]( 2000 ) COLLATE Latin1_General_CI_AS NOT NULL ,
    [MessageHtml][ntext] COLLATE Latin1_General_CI_AS NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatQueueItem](
    [QueueItemId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [ItemTime][bigint] NOT NULL ,
    [Scope][nvarchar]( 50 ) NOT NULL ,
    [SingleClientId][uniqueidentifier] NOT NULL ,
    [MultiClients][ntext] NULL ,
    [ItemName][nvarchar]( 50 ) NOT NULL ,
    [ItemType][nvarchar]( 50 ) NOT NULL ,
    [ItemXml][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatRelation](
    [RelationId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [IndexType][nvarchar]( 50 ) NOT NULL ,
    [Index1][int] NOT NULL ,
    [Index2][int] NOT NULL ,
    [RelationType][nvarchar]( 50 ) NOT NULL
    ) ON [ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatTempStateLog](
    [StateLogId][int] NOT NULL ,
    [ManagerId][int] NULL ,
    [LogTime][datetime] NULL ,
    [LogType][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NULL ,
    [Category][nvarchar]( 50 ) COLLATE Latin1_General_CI_AS NULL ,
    [ParentName][nvarchar]( 100 ) COLLATE Latin1_General_CI_AS NULL ,
    [TargetName][nvarchar]( 100 ) COLLATE Latin1_General_CI_AS NULL ,
    [TargetGuid][uniqueidentifier] NULL ,
    [TargetTime][datetime] NULL ,
    [TargetInteger][int] NULL ,
    [TargetText][ntext] COLLATE Latin1_General_CI_AS NULL ,
    [InfoXml][ntext] COLLATE Latin1_General_CI_AS NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteChatUser](
    [UserId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [UniqueName][nvarchar]( 50 ) NOT NULL ,
    [DisplayName][nvarchar]( 50 ) NOT NULL ,
    [PubicProperties][ntext] NULL ,
    [PrivateProperties][ntext] NULL ,
    [ContactSyncTime][datetime] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportCustomer](
    [CustomerId][uniqueidentifier] NOT NULL ,
    [UserId][int] NOT NULL ,
    [DisplayName][nvarchar]( 50 ) NULL ,
    [IPAddress][nvarchar]( 50 ) NOT NULL ,
    [Culture][nvarchar]( 50 ) NOT NULL ,
    [Platform][nvarchar]( 50 ) NULL ,
    [Browser][nvarchar]( 50 ) NULL ,
    [PathAndQuery][nvarchar]( 400 ) NOT NULL ,
    [BeginTime][datetime] NOT NULL ,
    [ActiveTime][datetime] NOT NULL ,
    [ STATUS ][nvarchar]( 50 ) NOT NULL ,
    [OperatorId][int] NULL ,
    [OperatorName][nvarchar]( 50 ) NULL ,
    [CurrentWorkXml][ntext] NULL ,
    [PubicProperties][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportFeedback](
    [FeedbackId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [Time][datetime] NOT NULL ,
    [UserId][int] NOT NULL ,
    [DisplayName][nvarchar]( 50 ) NOT NULL ,
    [Name][nvarchar]( 50 ) NOT NULL ,
    [Email][nvarchar]( 50 ) NOT NULL ,
    [Title][nvarchar]( 200 ) NOT NULL ,
    [Message][ntext] NOT NULL ,
    [LastReadOperatorId][int] NOT NULL ,
    [LastReadOperatorName][nvarchar]( 50 ) NOT NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportLog](
    [LogId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [Time][datetime] NOT NULL ,
    [LogType][nvarchar]( 50 ) NOT NULL ,
    [CustomerUserId][int] NULL ,
    [CustomerName][nvarchar]( 50 ) NULL ,
    [OperatorId][int] NULL ,
    [OperatorName][nvarchar]( 50 ) NULL ,
    [Message][ntext] NULL ,
    [Info1][nvarchar]( 500 ) NULL ,
    [Info2][nvarchar]( 500 ) NULL ,
    [Info3][nvarchar]( 500 ) NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportNote](
    [NoteId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [OperatorId][int] NOT NULL ,
    [OperatorName][nvarchar]( 50 ) NOT NULL ,
    [CreateTime][datetime] NOT NULL ,
    [UpdateTime][datetime] NOT NULL ,
    [Color][nvarchar]( 50 ) NOT NULL ,
    [Title][nvarchar]( 200 ) NOT NULL ,
    [Content][ntext] NOT NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportOperator](
    [UserId][int] NOT NULL ,
    [ClientId][uniqueidentifier] NULL ,
    [IsReady][bit] NOT NULL ,
    [SyncTicks][bigint] NULL ,
    [ActiveTime][datetime] NULL ,
    [CurrentWorkXml][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO CREATE TABLE [dbo].[CuteSupportSession](
    [LocationId][int]IDENTITY( 1, 1 ) NOT NULL ,
    [CustomerId][uniqueidentifier] NOT NULL ,
    [BeginTime][datetime] NOT NULL ,
    [ActiveTime][datetime] NOT NULL ,
    [UserId][int] NULL ,
    [DisplayName][nvarchar]( 50 ) NOT NULL ,
    [IPAddress][nvarchar]( 50 ) NOT NULL ,
    [Culture][nvarchar]( 50 ) NOT NULL ,
    [Platform][nvarchar]( 50 ) NOT NULL ,
    [Browser][nvarchar]( 50 ) NOT NULL ,
    [OperatorId][int] NOT NULL ,
    [OperatorName][nvarchar]( 50 ) NOT NULL ,
    [PubicProperties][ntext] NULL
    ) ON [ PRIMARY ]TEXTIMAGE_ON[ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatBadWord] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatBadWord] PRIMARY KEY CLUSTERED(
    [BadWordId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatChannel] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatChannel] PRIMARY KEY CLUSTERED(
    [ChannelId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatClient] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatClient] PRIMARY KEY CLUSTERED(
    [ClientId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatConfig] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatConfig] PRIMARY KEY CLUSTERED(
    [ConfigName]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatCustomItem] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatCustomItem] PRIMARY KEY CLUSTERED(
    [ItemId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatFile] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatFile] PRIMARY KEY CLUSTERED(
    [FileId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatIPRule] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatIPRule] PRIMARY KEY CLUSTERED(
    [RuleId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatInstantMessage] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatInstantMessage] PRIMARY KEY CLUSTERED(
    [MessageId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatLobby] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatLobby] PRIMARY KEY CLUSTERED(
    [LobbyId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatMessage] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatMessage] PRIMARY KEY CLUSTERED(
    [MessageId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatQueueItem] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatQueueItem] PRIMARY KEY CLUSTERED(
    [QueueItemId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatRelation] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatRelation] PRIMARY KEY CLUSTERED(
    [RelationId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatTempStateLog] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatTempStateLog] PRIMARY KEY CLUSTERED(
    [StateLogId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatUser] WITH NOCHECK ADD CONSTRAINT [PK_CuteChatUser] PRIMARY KEY CLUSTERED(
    [UserId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportCustomer] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportCustomer] PRIMARY KEY CLUSTERED(
    [CustomerId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportFeedback] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportFeedback] PRIMARY KEY CLUSTERED(
    [FeedbackId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportLog] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportLog] PRIMARY KEY CLUSTERED(
    [LogId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportNote] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportNote] PRIMARY KEY CLUSTERED(
    [NoteId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportOperator] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportOperator] PRIMARY KEY CLUSTERED(
    [UserId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportSession] WITH NOCHECK ADD CONSTRAINT [PK_CuteSupportSession] PRIMARY KEY CLUSTERED(
    [LocationId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatChannel] ADD CONSTRAINT [DF_CuteChatChannel_Locked]DEFAULT( 0 ) FOR [Locked],
    CONSTRAINT [DF_CuteChatChannel_KickedUsers]DEFAULT( '' ) FOR [KickedUsers]GO ALTER TABLE [dbo].[CuteChatClient] ADD CONSTRAINT [DF_CuteChatClient_Software]DEFAULT( '' ) FOR [Software],
    CONSTRAINT [DF_CuteChatClient_InstantTargetUserId]DEFAULT( 0 ) FOR [InstantTargetUserId]GO CREATE INDEX [IX_CuteChatCustomItem] ON [dbo].[CuteChatCustomItem](
    [ItemType],
    [ItemIndex]
    ) ON [ PRIMARY ]GO CREATE UNIQUE INDEX [IX_CuteChatFile] ON [dbo].[CuteChatFile](
    [DownloadId]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteChatLobby] ADD CONSTRAINT [DF_CuteChatLobby_Description]DEFAULT( '' ) FOR [Description],
    CONSTRAINT [DF_CuteChatLobby_IsPublic]DEFAULT( 1 ) FOR [IsPublic],
    CONSTRAINT [DF_CuteChatLobby_IsEnable]DEFAULT( 1 ) FOR [IsEnable],
    CONSTRAINT [DF_CuteChatLobby_IsHidden]DEFAULT( 0 ) FOR [IsHidden],
    CONSTRAINT [DF_CuteChatLobby_Authenticate]DEFAULT( 0 ) FOR [Authenticate],
    CONSTRAINT [DF_CuteChatLobby_AllowAnonymous]DEFAULT( 1 ) FOR [AllowAnonymous],
    CONSTRAINT [DF_CuteChatLobby_ManagerList]DEFAULT( '' ) FOR [ManagerList],
    CONSTRAINT [DF_CuteChatLobby_MaxOnlineCount]DEFAULT( 200 ) FOR [MaxOnlineCount]GO CREATE INDEX [IX_CuteChatQueueItem] ON [dbo].[CuteChatQueueItem](
    [ItemTime]
    ) ON [ PRIMARY ]GO CREATE INDEX [IX_CuteChatRelation] ON [dbo].[CuteChatRelation](
    [IndexType],
    [Index1],
    [Index2]
    ) ON [ PRIMARY ]GO CREATE INDEX [IX_CuteChatRelation_RelationType] ON [dbo].[CuteChatRelation](
    [IndexType]
    ) ON [ PRIMARY ]GO CREATE INDEX [IX_CuteChatTempStateLog] ON [dbo].[CuteChatTempStateLog](
    [ManagerId]
    ) ON [ PRIMARY ]GO CREATE UNIQUE INDEX [IX_CuteChatUser] ON [dbo].[CuteChatUser](
    [UniqueName]
    ) ON [ PRIMARY ]GO ALTER TABLE [dbo].[CuteSupportOperator] ADD CONSTRAINT [DF_CuteSupportOperator_IsReady]DEFAULT( 0 ) FOR [IsReady]GO
    MySQL said: 
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Roles]') a' at line 1
    [ Back ]   
     
     
     
    please help i like the look of this program ;)
     
    chris
  •  08-30-2006, 10:33 PM 22233 in reply to 22224

    Re: SQL

    chris,
     
    Cute Chat doesn't support MySQL in the current version. Please use SQL Server.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-21-2010, 8:47 PM 64580 in reply to 22224

    Re: SQL

View as RSS news feed in XML