Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

CFBloggy
Project Home Blog Known Issues External Project Link Contact Project

CFBloggy Issue: MSSQL Database Script

Name: MSSQL Database Script
ID: 1
Project: CFBloggy
Type: Bug
Area: Database
Severity: Low
Status: Closed
Related URL:
Creator: Dan
Created: 05/09/08 1:53 PM
Updated: 07/28/09 12:41 AM
Description: The if condition for the drop table statements in the MSSQL script did not work on my installation of SQL Server 2000 or SQL Server 2005. I researched the syntax for SQL Server. Below are the updated statements.

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[blog_tbl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[blog_tbl]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cat_tbl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[cat_tbl]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblBlogCategories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblBlogCategories]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[comment_tbl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[comment_tbl]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[newsletter_tbl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[newsletter_tbl]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[users_tbl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[users_tbl]
GO
History: Created by dsirucek (Dan) : 05/09/08 1:53 PM

Updated by JohnRamon (John Ramon) : 07/28/09 12:41 AM

To add a comment to this bug, please login using the link above.