Click here to Skip to main content
15,896,730 members
Home / Discussions / Database
   

Database

 
Questiondoubt in logical schema of database Pin
Member 129343424-Jan-17 3:19
Member 129343424-Jan-17 3:19 
AnswerRe: doubt in logical schema of database Pin
Afzaal Ahmad Zeeshan4-Jan-17 3:42
professionalAfzaal Ahmad Zeeshan4-Jan-17 3:42 
AnswerRe: doubt in logical schema of database Pin
Richard MacCutchan4-Jan-17 5:01
mveRichard MacCutchan4-Jan-17 5:01 
GeneralRe: doubt in logical schema of database Pin
Eddy Vluggen4-Jan-17 7:02
professionalEddy Vluggen4-Jan-17 7:02 
GeneralRe: doubt in logical schema of database Pin
Richard MacCutchan4-Jan-17 22:04
mveRichard MacCutchan4-Jan-17 22:04 
QuestionMySql - No results from query with WHERE Pin
BobbyStrain2-Jan-17 16:44
BobbyStrain2-Jan-17 16:44 
AnswerRe: MySql - No results from query with WHERE Pin
Mycroft Holmes2-Jan-17 20:45
professionalMycroft Holmes2-Jan-17 20:45 
GeneralRe: MySql - No results from query with WHERE Pin
Jörgen Andersson2-Jan-17 22:56
professionalJörgen Andersson2-Jan-17 22:56 
GeneralRe: MySql - No results from query with WHERE Pin
Mycroft Holmes3-Jan-17 10:29
professionalMycroft Holmes3-Jan-17 10:29 
AnswerRe: MySql - No results from query with WHERE Pin
Bernhard Hiller2-Jan-17 21:01
Bernhard Hiller2-Jan-17 21:01 
GeneralRe: MySql - No results from query with WHERE Pin
BobbyStrain3-Jan-17 4:30
BobbyStrain3-Jan-17 4:30 
QuestionDelete rows from a foxpro dbf file, that seems to be locked Pin
jkirkerx28-Dec-16 13:04
professionaljkirkerx28-Dec-16 13:04 
AnswerRe: Delete rows from a foxpro dbf file, that seems to be locked Pin
CHill6029-Dec-16 3:59
mveCHill6029-Dec-16 3:59 
GeneralRe: Delete rows from a foxpro dbf file, that seems to be locked Pin
jkirkerx29-Dec-16 7:04
professionaljkirkerx29-Dec-16 7:04 
AnswerI got this working partially, but can't figure out why I can't delete by Invoice Number Pin
jkirkerx29-Dec-16 8:07
professionaljkirkerx29-Dec-16 8:07 
GeneralI got it working, not sure it will always work Pin
jkirkerx29-Dec-16 9:23
professionaljkirkerx29-Dec-16 9:23 
QuestionUpdating a FoxPro dbf file using VB.net Pin
jkirkerx22-Dec-16 11:32
professionaljkirkerx22-Dec-16 11:32 
AnswerRe: Updating a FoxPro dbf file using VB.net Pin
jkirkerx22-Dec-16 11:37
professionaljkirkerx22-Dec-16 11:37 
AnswerRe: Updating a FoxPro dbf file using VB.net Pin
jschell26-Dec-16 7:17
jschell26-Dec-16 7:17 
GeneralRe: Updating a FoxPro dbf file using VB.net Pin
jkirkerx27-Dec-16 7:09
professionaljkirkerx27-Dec-16 7:09 
QuestionDrop & Recreate the DB Pin
Kevin Marois21-Dec-16 12:48
professionalKevin Marois21-Dec-16 12:48 
I'm starting a new script. This is local on my machine and I'm the only user:
-- IF THE DATABASE EXISTS, DROP AND RE-CREATE IT
IF EXISTS (SELECT Name FROM master.dbo.sysdatabases WHERE name = N'Dashboard')
BEGIN
    ALTER DATABASE Dashboard SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE Dashboard
END
CREATE DATABASE Dashboard

-- CREATE THE TABLES
GO
USE Dashboard
CREATE TABLE DashboardInfo
    (Id                 INT PRIMARY KEY NOT NULL,
     SiteId             INT NOT NULL,
     InstrumentId       INT NOT NULL,
     TowerLocation      INT NOT NULL)

The first time I run it all works fine. Any time I run it after that I get
Msg 3702, Level 16, State 3, Line 5
Cannot drop database "Dashboard" because it is currently in use.
Msg 1801, Level 16, State 3, Line 7
Database 'Dashboard' already exists. Choose a different database name.
Msg 2714, Level 16, State 6, Line 12
There is already an object named 'DashboardInfo' in the database.

If I close and re-open SSMS then it works ok again.

WTF is wrong here??????????
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Drop & Recreate the DB Pin
Chris Quinn21-Dec-16 22:03
Chris Quinn21-Dec-16 22:03 
GeneralRe: Drop & Recreate the DB Pin
Kevin Marois22-Dec-16 4:37
professionalKevin Marois22-Dec-16 4:37 
QuestionRe: Drop & Recreate the DB Pin
Richard MacCutchan22-Dec-16 4:59
mveRichard MacCutchan22-Dec-16 4:59 
AnswerRe: Drop & Recreate the DB Pin
Kevin Marois22-Dec-16 4:59
professionalKevin Marois22-Dec-16 4:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.