Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7417313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:40:36+00:00 2026-05-29T07:40:36+00:00

I have a very basic question about SQL server and Visual Studio 2010. I’m

  • 0

I have a very basic question about SQL server and Visual Studio 2010. I’m currently reading the book “C# 3.0 Unleashed with the .NET framework 3.5”. I’m at the chapter where LINQ to SQL is explained. The writer asks to create a new database and use his script (given in the book) to create the tables and fill these with some data.

However, as I’ve never worked with SQL server before, this part is a bit confusing for me. The writer doesn’t explain how to create the database. First I thought I could just right-click on Data Connections -> Create New SQL Server Database. However, when I tried that, I only got an error explaining no connection could be made.

When that didn’t work, I added a new Service-based Database via Add -> New Item. This works (although I do not understand the difference between this and the previous thing I’ve tried. If someone could explain this for me, It’d be very appreciated), but now I’m supposed to use the script to create the tables and enter some data. I can right-click on the database and select New Query, but that window doesn’t seem to accept such scripts.

First part of the script:

/****** Object: Table [dbo].[HospitalStaff]Script Date: 12/29/2007 21:42:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (
SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N’[HospitalStaff]’)
AND type in (N’U’))
BEGIN
CREATE TABLE [HospitalStaff](
[HospitalStaffID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50)
COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Position] [varchar](50)
COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
CONSTRAINT [PK_HospitalStaff] PRIMARY KEY CLUSTERED
(
[HospitalStaffID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON)
)
END

I know it’s a very basic question, but where can I execute this script? I’ve visited several websites with SQL server tutorials, but it’s all pretty confusing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:40:38+00:00Added an answer on May 29, 2026 at 7:40 am
    • Add a new .sql file in your solution with .sql extension
    • Open that file
    • Right click
    • Execute script

    enter image description here

    more info at

    http://msdn.microsoft.com/en-us/library/yea4bc1b(vs.80).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very basic question about the LocalMon print monitor found at http://msdn.microsoft.com/en-us/library/windows/hardware/ff556478%28v=vs.85%29.aspx
I have a very basic question about calculating RMSE in an NB classification scenario.
I have a very basic question about how to write to a plist. I
I have a very basic question about MVC web applications in Java. Since the
I have a very basic question about binding between controls. I have a class
I have very basic question about the use of high performance cluster in our
I have a very basic question about SVN. I know SVN has pretty strict
I have a very basic question about populating listviews in android. Right now, if
I'm a newbie and I have a very basic question about PHP arrays Code:
Very basic question about iPhone memory management: Say I have a viewController with several

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.