Username: Password:

dataGrid 中添加数据-ASP教程,数据库相关
来源:作者: 发布时间:2007-12-26 02:05:48

文档代码:
test.aspx
===========================>
<%@ page language="c#" debug="true"%>
<%@import namespace="system.data"%>
<%@ import namespace="system.data.sqlclient" %>




webdiyer制造:)










/>







/>







/>






















说明:datagrid中的数据类型都没有进行验证,假如输入错误的数据类型或空值可能会出错,实际应用中应该对用户输入的数据进行验证!







数据库中employees表结构:

create table employees (
[id] [int] identity (1, 1) not null ,
[name] [nvarchar] (10) collate chinese_prc_ci_as not null ,
[age] [tinyint] not null ,
[address] [nvarchar] (50) collate chinese_prc_ci_as not null
) on [primary]
go

alter table employees add
constraint [pk_employees] primary key clustered
(
[id]
) on [primary]
go


喜欢本文,那就收藏到:

    Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网
相关评论  我也要评论
还没有关于此文章的相关评论!
  • 昵称: (为空则显示guest)
  • 评论分数: ★ ★ ★★★ ★★★★ ★★★★★
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 导航
    赞助商
    文章类别
    订阅