Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding northwnd sql server database for use in crystal reports

Status
Not open for further replies.

AzizKamal

Programmer
Apr 6, 2010
122
PK
I need to use NORTHWND sql server database in Visual Studio 2008. On my work computer, I do not have a separate copy of sql server installed and hence I have only sql server features available that come along with VS 2008 (i.e., SQL Server 2005 options available through Server Explorer).

I copied NORTHWND.MDF and NORTHWND.LDF from website. After this, I proceeded as follows in Visual Studio 2008:

1. View -> Server Explorer
2. Right-Clicked Data Connections, selected Add Connection…
3. In Database file name, I entered D:\SQLSample\NORTHWND.MDF and clicked OK
4. NORTHWND.MDF appeared below Data Connections
5. Under Tables, I right-clicked Employees and selected Show Table Data and employee records appeared on the right

Now the issue is I need to use NORTHWND in my crystal reports code. So, I proceeded as follows:

1. In ASP.NET web application, right clicked webapplication name, Add->New Item->Crystal Report
2. Selected As a Blank Report and clicked OK
3. In the Field Explorer, right-clicked Database Fields. Selected Database Expert
4. Current Connections showed no items found
5. In Create New Connection, I selected OLE DB ADO, selected Microsoft OLE DB Provider for SQL Server in the Provider list and clicked Next
6. In the Server, selected C1\SQLEXPRESS (C1=Computer Name) and checked Integrated Security and clicked Next
7. Then clicked Finish
8. With this, I got C1\SQLEXPRESS node. Below it are Add Command and one more node. But there is no entry available for NORTHWND database, which is needed in my case to be able to use its columns/fields in crystal reports Design

 
The following steps worked in my scenario:

1. Downloaded SQL2000SampleDb.msi from the website:
2. Executed SQL2000SampleDb.msi
3. This installed instnwnd.sql (with other files) at C:\SQL Server 2000 Sample Databases
4. Then I executed the following command from command prompt:
Code:
C:\SQL Server 2000 Sample Databases>sqlcmd -S .\SQLEXPRESS -i instnwnd.sql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top