快速业务通道

asp.net夜话之七:ADO.NET介绍

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-05-21
name = N''AspNetStudy'')
DROP DATABASE [AspNetStudy]
GO
CREATE DATABASE [AspNetStudy] ON (NAME = N''AspNetStudy_Data'', FILENAME = N''C:\Program Files\Microsoft SQL Server\MSSQL\data\AspNetStudy_Data.MDF'' , SIZE = 1, FILEGROWTH = 10%) LOG ON (NAME = N''AspNetStudy_Log'', FILENAME = N''C:\Program Files\Microsoft SQL Server\MSSQL\data\AspNetStudy_Log.LDF'' , SIZE = 1, FILEGROWTH = 10%)
COLLATE Chinese_PRC_CI_AS
GO
use [AspNetStudy]
GO
if exists (select * from dbo.sysobjects where id = object_id(N''[dbo].[UserInfo]'') and OBJECTPROPERTY(id, N''IsUserTable'') = 1)
drop table [dbo].[UserInfo]
GO
CREATE TABLE [dbo].[UserInfo] (
[UserID] [int] IDENTITY (1, 1) NOT NULL ,
[UserName] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[RealName] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Age] [tinyint] NOT NULL ,
[Sex] [bit] NOT NULL ,
[Mobile] [char] (11) COLLATE Chinese_PRC_CI_AS NULL ,
[Phone] [char] (11) COLLATE Chinese_PRC_CI_AS NULL ,
[Email] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]
GO
CREATE UNIQUE INDEX [IX_UserName] ON [dbo].[UserInfo]([UserName]) WITH IGNORE_DUP_KEY ON [PRIMARY]
GO
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''zhangfei'',''张飞'',36,''13455663420'',''03517890360'',''zhangfei@msn.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''guanyu'',''关羽'',38,''13455663421'',''03517890361'',''guanyu@163.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''liubei'',''刘备'',42,''13455663422'',''03517890362'',''liubei@163.net'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''zhougong'',''周公'',29,''13455663423'',''03517890363'',''zhoufoxcn@tom.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''zhaoyun'',''赵云'',32,''13455663424'',''03517890364'',''zhaoyun@sohu.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''huanggai'',''黄盖'',50,''13455663425'',''03517890365'',''huanggai@live.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''zhugeliang'',''诸葛亮'',27,''13455663426'',''03517890366'',''zhugeliang@hotmail.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''jiangwei'',''姜维'',22,''13455663427'',''03517890367'',''jiangwei@netease.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''caocao'',''曹操'',48,''13455663428'',''03517890368'',''caocao@qq.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''guojia'',''郭嘉'',32,''13455663429'',''03517890369'',''guojia@21cn.com'',1);
insert into UserInfo([UserName],[RealName],[Age],[Mobile],[Phone],[Email],[Sex])values(''sunquan'',''孙权'',33,''13455663430'',''03517890370'',''sunquan@gmail.com'',1);
insert into UserInfo([User

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号