SQL Server Project Template

Use the SQL Server Class Library template to create SQL Server class library applications.

The template automatically adds the essential project references and files to use as a starting point for your application:

  • References to these Microsoft .NET Framework namespaces:

    • System — Contains fundamental classes and base classes that define commonly used values and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.

    • System.Data — Contains classes that constitute the ADO.NET architecture, which is the primary data access method for managed applications.

    • System.Data.Sql — Contains classes for managing available instances of SQL Server within the local network.

    • System.Data.SqlTypes — Contains classes for native data types within SQL Server 2005 that provide a safer, faster alternative to the data types provided by the .NET Framework common language runtime.

    • Microsoft.SqlServer.Server — Contains classes that simulate communication channels between the client and server.

  • Source files:

    • <SQLServerProjectName>.cpp — The default source file. It contains the declaration for a function named MyStoredProc, which is declared with the [Microsoft.SqlServer.Server.SqlProcedure] attribute to denote that it is a common language runtime enabled SQL stored procedure. Provide your own code in this file.

    • AssemblyInfo.cpp — The file that contains information about the assembly metadata of your project. It includes information about attributes, files, resources, types, versioning information, and signing. For more information, see Assembly Contents.

    • stdafx.cpp — A file that is used to build a precompiled header file named Win32.pch, and a file named stdafx.obj that contains precompiled types.

  • Header files:

    • <SQL Server Project Name>.h — The main include file for the project, which contains all declarations, global symbols, and #include directives for other header files.

    • stdafx.h — A file that is used to build a precompiled header file named Win32.pch, and a file named stdafx.obj that contains precompiled types.

    • resource.h - A generated include file for app.rc.

  • Resource files:

    • app.rc — The resource script file of a program.

    • app.ico —The icon file of a program.

  • ReadMe.txt — A file that describes each file in your project using the file names that are created by the template.

See Also

Tasks

How to: Create a SQL Server Project (C+)

How to: Deploy a C++ SQL Server Project to a Server