/****** object: table [dbo].[users] script date: 2004-01-08 0:46:36 ******/ create table [dbo].[users] ( [id] [int] identity (1, 1) not null , [truename] [char] (20) not null , [regname] [char] (20) not null , [pwd] [char] (10) not null , [sex] [char] (2) null , [email] [char] (20) null ) on [primary] go
alter table [dbo].[customers] with nocheck add constraint [pk_customers] primary key nonclustered ( [customerid] ) on [primary] go
alter table [dbo].[users] with nocheck add constraint [pk_users] primary key nonclustered ( [id] ) on [primary] go
(2)创建业务实体层 1.打开vs.net2002,新建一个项目,选asp.net web服务,位置是: http://localhost/mydotnet/tiner/webdata/ 2.webservice的代码 using system; using system.collections; using system.componentmodel; using system.data; using system.data.sqlclient; using system.diagnostics; using system.web; using system.web.services; using system.web.ui; using system.web.ui.webcontrols; using system.web.ui.htmlcontrols;
添加引用后,如下图: 好了,我们开始写代码,详细代码如下: using system; using system.collections; using system.componentmodel; using system.data; using system.drawing; using system.web; using system.web.sessionstate; using system.web.ui; using system.web.ui.webcontrols; using system.web.ui.htmlcontrols; using system.data.sqlclient;