O script para gerar o banco de dados Agenda.mdf:
CREATE DATABASE [Agenda] ON PRIMARY ( NAME = N'Agenda', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Agenda.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'Agenda_log', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\Agenda_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) GO |
CREATE TABLE [dbo].[Agenda]( [id] [int] IDENTITY(1,1) NOT NULL, [nome] [nvarchar](50) NULL, [endereco] [nvarchar](50) NULL, [cidade] [nvarchar](50) NULL, [estado] [nvarchar](50) NULL, [pais] [nvarchar](50) NULL, [telefone] [nvarchar](50) NULL, [email] [nvarchar](100) NULL, CONSTRAINT [PK_Agenda] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO |
Simples, simples assim...
Pegue o projeto completo aqui: AgendaCSharp.zip
Fora de tópico Mostrar Código Esconder Código Mostrar EmoticonEsconder Emoticon