i am getting an error ... given below and my web.config is also given below
can any one help me is my connection string right ...
i am using sql server 2005 ..
my system name is soft18 ..
Server Error in '/prjLogin' Application.
Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExcepti....................
........................
................
...................
Hi.I'm very new to this so I apologise in advance for asking the blindibly obvious. I have installed SQL Express and SQL Server Management Studio Express and I have downloaded and attached the Northwind sample database. I can see and edit the data in the tables but when I try to open the Database Diagram node I get the following message:Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.I have no idea what a valid logon would be. Can somebody help? Thanks
From the http://msdn.microsoft.com/en-us/library/bb384469.aspx (Walkthrough: Creating Stored Procedures for the Northwind Customers Table, I copied the following sql code:
--UpdateSPforNWcustomersTable.sql--
USE NORTHWIND
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'SelectCustomers' AND user_name(uid) = 'dbo')
DROP PROCEDURE dbo.[SelectCustomers]
GO
CREATE PROCEDURE dbo.[SelectCustomers]
AS
SET NOCOUNT ON;
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM dbo.Customers
GO
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'InsertCustomers' AND user_name(uid) = 'dbo')
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers WHERE (CustomerID = @CustomerID)
GO
==================================================================================== I executed the above code in my SQL Server Management Studio Express (SSMSE) and I got the following error messages:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'NORTHWIND'. No entry found with that name.
Make sure that the name is entered correctly.
=============================================================================================================== I know I recreated the NORTHWIND Database from a different Database before and I did not do anything for the entry in sysdatabases. How can I change the entry in sysdatabases for database 'NORTHWIND' now? Please help and advise.
Please, can anyone tell me why I am getting the undermentioned error message when I develop my application as an IIS Site in Visual Web Developer 2005 Express ? I have already developed and successfully tested it as a 'FileSystem Web Site' .I am using SQLSErver Express 2005 edition and have which I have installed along with the Northwind database as per the download instructions. My IIS software is version 5.1 which I have checked and it is configured to allow Integrated Windows Authentication. the relevant code is (1) web.config file connection strings <connectionStrings> <add name="NorthwindConnectionString" connectionString="Data Source=.sqlexpress;Initial Catalog=Northwind;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings>(2) the grid view control and sqldatasource <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False" ReadOnly="True" SortExpression="CategoryID" /> <asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" /> <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]"> </asp:SqlDataSource>This is the full error message and details: Server Error in '/sqlservertest' Application.
Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
Hi there. Im new to working with SQL Servers, so please be patient. I recently downloaded some samples of connecting to SQL Servers using VB.net. Problem is I cannot connect to the server. I get an error "Cannot open database "northwind" requested by the login. The login failed"
I can connect to the database no problem using SQL Service Management Studios (SQL2005), so I think the problem lies either with the setup of the PC im using (security), or perhaps it cannot find the database. The code Im using is as follows
Dim DS As DataSet Dim MyConnection As SqlConnection Dim MyCommand As SqlDataAdapter MyConnection = New SqlConnection("Trusted_Connection=yes;server=.sqlexpress;Integrated Security=SSPI;uid=sa;pwd=;database=northwind") MyCommand = New SqlDataAdapter("select firstname as 'First Name', lastname as 'Last Name' Title from Employees", MyConnection) DS = New DataSet("Employees") MyCommand.Fill(DS) 'This is where the error occurs grdEmployees.DataSource = DS grdEmployees.DataBind()
I've been reading up on this problem for a week but with no luck.
Can't open Northwind - asp.net - dataaccess-sqldatasource
I remembered doing walkthrough using Northwind. However it wasn't an http project but a file project using the development server. Northwind allowed me to add, edit and insert, and the web page looked fine. I opened a simple project just to see whether I could get my sqlserver on the internet. (vs studio 2005, sqlserver 2005) I created the project in http location http://localhost/Northwind . I dragged a sqldatasource to the page, configuring it to display ID and ProductName. I clicked advanced, but noticed the generate insert, edit and delete were grayed out. That told me something was wrong with my authetification. I configured my sqlserver 2005 to have integrated security. I built the solution and website, then pressed cntl-F5. I got a login error. Nowhere did the page ask me for username and password. First questions - how do I get this to open up a web page, and how to I get it to allow me to generate insert, edit and delete statements? dennist685 Server Error in '/Northwind' Application.-------------------------------------------------------------------------------- Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'YOUR-02910F1DF1ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'YOUR-02910F1DF1ASPNET'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'YOUR-02910F1DF1ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.DetailsView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
I try to learn "How to Access Stored Procedures with ADO.NET 2.0 - VB 2005 Express: (1) Handling the Input and Output Parameters and (2) Reporting their Values in VB Forms". I found a good article "Calling Stored Procedures from ADO.NET" by John Paul Cook in http://www.dbzine.com/sql/sql-artices/cook6. I downloaded the source code into my VB 2005 Express:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form_Cook
Inherits System.Windows.Form.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents labelPAF As System.Windows.Forms.Label
Friend WithEvents labelNbrPrices As System.Windows.Forms.Label
Friend WithEvents UpdatePrices As System.Windows.Forms.Button
Friend WithEvents textBoxPAF As System.Windows.Forms.TextBox
Friend WithEvents TenMostExpensive As System.Windows.Forms.Button
Friend WithEvents grdNorthwind As System.Windows.Forms.DataGrid
Friend WithEvents groupBox2 As System.Windows.Forms.GroupBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.labelPAF = New System.Windows.Forms.Label()
Me.labelNbrPrices = New System.Windows.Forms.Label()
Me.textBoxPAF = New System.Windows.Forms.TextBox()
Me.UpdatePrices = New System.Windows.Forms.Button()
Me.groupBox2 = New System.Windows.Forms.GroupBox()
Me.TenMostExpensive = New System.Windows.Forms.Button()
Me.grdNorthwind = New System.Windows.Forms.DataGrid()
) ================================================= In my VB 2005 Express, I created a project "KimmelCallNWspWithAdoNet" that had the following code: --Form_Kimmel.vb-- Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form_Kimmel
Public Sub InsertCustomer()
Dim connectionString As String = "Integrated Security-SSPI;Persist Security Info=False;" + _
End Class ==============================================
I executed the Form_Kimmel.vb and I got no errors. But I did not get the new values insterted in the table "Custermers" of Northwind database. Please help and tell me what I did wrong and how to correct this problem.
I have to do an exercize where i am using Northwind sample database. I am normally accustomed to linking to a database on another server. Is there a way i can just include the Northwind database to my project. In general, I need to find out how to link to the Northwind db so I can start querying and processing data. thanks for your help
I want use the the Northwind database do some example! I had installed the Visual Web Deveplopment Express Edition and installed the SQL Server 2005 Express Edition .but I build one new Website and connect the Northwind database but i can't find the it from the Database Explorer.why?
sara writes "Dear Sir/Madam, I use Sql Server 2005.I want to use Northwind Database & I have it but I could not Execute That It is the error: Msg 911, Level 16, State 1, Line 1 Could not locate entry in sysdatabases for database 'NorthwindCS'. No entry found with that name. Make sure that the name is entered correctly.
Hi I have just started using the SQL Server 2005 Express Edition and wondering how to install the InstNwnd.sql from the sql file. I can't find any way to insert the database
I'm installing Northwind Database onto Local Computer. The Computer's Name is (Localhost)The Installation Menu is asking to for the [Enter Name of the (Server)] "______________________" Am I correct in assuming to Enter Localhost - for the [Enter Name of the (Sever)]. "___Localhost_____" Can someone comfirm as to whether this is correct or not... Thank You.
I have asked for the following questions and I need your advises.Utilizing the Northwind database suppied with SQL Server, create SQL tosolve each of the exercises listed.1.I want to contact all customers who have received over $1,000 indiscounts on orders this year. Give me the name and phone number of theperson to contact at the customers site. Also, list the orders wherethe total discount was greater than $100. Remember, discount is apercentage of the price.2.Give me a list of suppliers and products where we do not have thestock on hand to fill the orders to be shipped. List out the customerand order information for each of the products involved.3.Give me a list of all orders that were shipped after the requireddate for the week of Jan 7, 2001. I want to know the name of theemployees that were responsible for the orders.4.We are having a golf tournament and I need some prizes. Give me alist of the top 5 shippers by dollar amount in the last year.5.Some customers are taking us for a ride on shipping. Give me a listof customers and the orders involved where more than ½ of their ordersare being shipped to a region other than their home region.Please advise ...thanks a lot
I just downloaded and installed MSDE2000 sp3a for winform and asp.net quickstart tutorial. But I found it has no sample database such as pubs and northwind. It used to have these databases. At least in last September when .Net web Matrix came out.
If this is the case, can someone tell me where to get the sql scripts to create Northwind database in MSDE? Becasue the winform tutorial uses this database.
Does anyone know where I can find a Northwind end to end database solutions (examples) written in ASP.NET (VB). I would like to reverse engineer this project to learn more about ASP.NET?
I am trying to connect to SQL 7.0 northwind database via visual studio2005. But I can't open the connection. I get an error saying remoteaccess is not allowed. But the remote access is ok. I can used the samelogin and connect to the sql server via enterprise manage.SqlConnection conn = new SqlConnection("DataSource=(sqlserver:1433);Initial Catalog=Northwind;UserID=me;Password=mypassword");The above is the string I am trying to use.Is there a way to do this in Visual studio thanks
I get the below error only when my IDE open. It connects well when it is found closed. [SqlException (0x80131904): Cannot open user default database. Login failed.Login failed for user 'JPASPNET'.] I could solve this by giving the logged in windows user to impersonate under IIS window > WEBSITE > ASP.NET tab > EDIT CONFIG > APPLICATION tab But I wish someone could give me the proper solution. I almost tried all from giving ASPNET user as a administrator to configuring the same in Express management tool. Environment: XP pro, VWD and SQL Express
i try create this example:http://www.codeproject.com/KB/webforms/ReportViewer.aspxI have Northwind database added in the SQL server management and i select Northwind databse in drop box and I push Execute!ALTER PROCEDURE ShowProductByCategory(@CategoryName nvarchar(15) )ASSELECT Categories.CategoryName, Products.ProductName, Products.UnitPrice, Products.UnitsInStockFROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryIDWHERE CategoryName=@CategoryNameRETURNbut error is:Msg 208, Level 16, State 6, Procedure ShowProductByCategory, Line 11Invalid object name 'ShowProductByCategory'.on web not so clear what is issue pls. help
I am trying to execute the following query , in Management Studio. But it takes forever. Can someone tell me why is this happening? I am running the query in 'NorthWind' database.The windows account under which I am logged into WinXP (windows authentication is enabled for the SQL Server database) is the database owner for NorthWind database. alter database NorthWind SET ENABLE_BROKER
Hi,Good morning to All. While doing practice I did some modifications to some tables in Northwind database.Now, how can I get my original tables back again? Take Oracle for example:We can modify table data. But when we run demobld.sql script then all tables will replaces with original entries. Like this I want in SQL Server also. Is there any such facility available in SQL Server? Thanks in advance,Ashok kumar.
I have been following the Visual Basic Guided Tour for VB 2008 Express and I'm having a problem with the following part.
ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vbcnexpress/html/48fcb538-d8c7-4299-a2bf-a5b6f80d879d.htm Creating LINQ to SQL Classes: Using the O/R Designer
I am getting the error "Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.", when I get to the Test Connection button.
but I have no idea how to use this information as it assumes the user knows what they are doing! The solution appears to involve running a scipt of some sort, but where would that be run? I have looked at the SQL server Express information, but can't find how to run sp_configure. Your help would be much appreciated.
I downloaded the Northwind database install script (SQL2000SampleDb.msi) and ran instnwnd.sql in my SQL Server Management Studio Express. I got the following error messages:
Msg 5105, Level 16, State 2, Line 1
A file activation error occurred. The physical file name 'northwnd.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available databases.
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'Northwind'. No entry found with that name. Make sure that the name is entered correctly.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Customers' because it is referenced by a FOREIGN KEY constraint.
Msg 3726, Level 16, State 1, Line 2
Could not drop object 'dbo.Employees' because it is referenced by a FOREIGN KEY constraint.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Employees' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'LastName' already exists on table 'dbo.Employees'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Employees'.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Customers' in the database.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'City' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'CompanyName' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Customers'.
Msg 1913, Level 16, State 1, Line 1
The operation failed because an index or statistics with name 'Region' already exists on table 'dbo.Customers'.
(1 row(s) affected)
............................................etc.
Please help and advise me how to get the Northwind database installed in my SQL Server Management Studio Express.
I tried to install the Northwind database into SQl Server Express via the instnwnd.sql script using the command line:
osql -E -i instnwnd.sql
after a time out though I get this message:
"[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. [SQL Native Client]Login timeout expired [SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections."
I already granted access to the administrator account on my machine.
I am using Northwind database to Create a view showing every order that was shipped to Spain. Name the destination column 'DestinationSpain'. Include code that checks if the view already exists. If it does, it should be dropped and re-created.
Here is my script:
use Northwind GO
/*STEP 2, #1*/
/* does it exist, if so drop it */ if exist (select * from dbo.sysobjects where id = object_id(N'[dbo].[OrdersToSpain]') and OBJECTPROPERTY(id, N'IsView') = 1) drop view [dbo].[OrdersToSpain] GO
/* Create the View */ create view "OrdersToSpain" AS SELECT Orders.OrderID AS Order_ID, Orders.CustomerID AS Customer_ID, Orders.OrderDate AS Ordered_Date. Orders.ShippedDate AS Shipped_Date, Orders.ShipCountry AS DestinationSpain FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE Orders.ShipCounty LIKE '%SPAIN%' GO
Here are the errors I am getting:
Server: Msg 156, Level 15, State 1, Line 5 Incorrect syntax near the keyword 'select'. Server: Msg 170, Level 15, State 1, Line 6 Line 6: Incorrect syntax near ')'. Server: Msg 170, Level 15, State 1, Procedure OrdersToSpain, Line 7 Line 7: Incorrect syntax near '.'.
I have Visual Studio 2005 Beta 2.00 install which have installed the SQLEXPRESS server. I have the Script for the Northwind database which I need to run some demos but I can figure out how to execute this script. Can someone tell me what todo or how to attatched the database to this server. I also have a copy of the database already created. But When I tried login in into the database I get an error login fail. Which is the default user amd password for the northwind database? Tia Charles
Long time ago, I downloaded the Northwind and pubs databases from the Microsoft website (I do not remember the details of it) and installed these two databases together into the SQL Server Management Studio Express of my PC (Microsoft Windows XP Pro). I tried to learn an example of using "User Instance" (source code was from a book) on the Northwind database located in my SQL Server Management Studio Express. I just find out that my Northwind database has the title only and no tables at all. If I click on the "+" in front of the "Northwind", I got the following error message:
Microsoft SQL Server Management Studio Express
Failed to retrieve data for this request.(Microsoft SqlServer.Express.SmoEnum)
Additional information:
One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from backup. (Microsoft SQL Server, Error: 5173)..
Please help and tell me how I can repair this Northwind database in my SQL Server Management Studio Express.
Scott Chang
P. S.
I deleted the name 'Northwind' in my SQL Server Management Studio Express, executed the "SQL2005DBScriptsInstnwind" program and I got the following error message: Msg 1802, Level 16, State 4, Line 1
CREATE DATABASE failed. Some file name listed could not be created. Checked related errors.
Msg 5170, Level 16, state 1, Line 1
Cannot create file 'c:Program FilesMicrosoft SQL ServerMSSQL.1DATAorthwindorthwind.ldf' because it already exist. Change the file path or the file name, and retry the operation.
Msg 15100, Level 16, State 1, Procedure sp_dboption, Line 64
The database 'Northwind' does not exist. Use sp_helpdb to show available database.
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'Northwind'. No entry found with that name. Make sure that name is entered correctly
I tried to use dbo.tables of Northwind database in SQL Server Express to do SqlCommand to populate a DataTable in DataSet. The SqlCommand failed in the project execution and I found that Northwind database in SQL Server Express is busted and gone (just the name "Northwind" remained in the SQL Server Management Studio Express). How can I prevent it from happening in my "SqlCommand-SqlConnection" project? Please help and advise.
I tried to repair my "Northwind" database by using the SQL2000SampleDb.msi of Northwind and pubs Sample Databases for SQL Server 2000 downloaded from the http://www.microsoft.com/downloads. My "pubs" database is still in my SQL Server Management Studio Express. How can I just repair my "Northwind" database by using the Microsoft SQL2000SampleDb.msi program? Please help and advise this matter too.