fengrengui

导航

2006年5月25日

DataGrid 超链接列怎样获得后台程序中的参数

摘要: 小弟无知,写成这样:" DataTextField="Name" SortExpression="Name" HeaderText="Application (click to view)">其中IsDelete 是后台程序中的一个参数,我试了一下,没有获得这个参数,地址栏中显示的是:/Master.aspx?id=32&index=1&adminindex=3&IsEdit=0&IsDelete... 阅读全文

posted @ 2006-05-25 13:38 阿贵 阅读(1342) 评论(2) 推荐(0)

2006年5月23日

一个update的触发器

摘要: 用户要求保留删除的数据,我决定加一个DeleteTime字段,作为标记,deletetime为不为空说明数据已经删除。create TRIGGER dbo.AfterApplicationDeleteON dbo.tb_Applications for update ASdeclare @DeleteTime datetimeset @DeleteTime=(select DeleteTime f... 阅读全文

posted @ 2006-05-23 09:17 阿贵 阅读(788) 评论(0) 推荐(0)

2006年5月14日

SQL查找第n条记录的方法

摘要: SQL查找第n条记录的方法:select top 1 * from table where id not in (select top n-1 id from table) temptable0SQL查找第n条开始的m条记录的方法:select top m * from table where id not in (select top n-1 id from table) temptable0)... 阅读全文

posted @ 2006-05-14 21:19 阿贵 阅读(736) 评论(0) 推荐(0)

2006年5月12日

asp.net中datagrid数据删除后重新绑定会再删一条记录

摘要: 在删除grid中一条记录后,会同时再删除另外一条(grid的第一行),之后每点一下IE的刷新就会再删除一条。在不点删除的时候,刷新是没有问题的。将第5行注释掉,添加第6行问题解决。但还是很不明白原来的程序问题出在哪。??????????? 1protected void OrgsGrid_OnDelete(Object sender, DataGridCommandEventArgs e)2 ... 阅读全文

posted @ 2006-05-12 09:53 阿贵 阅读(1118) 评论(4) 推荐(0)

asp.net中datagrid删除最后一行的怪异问题

摘要: 在datgrid中最后一行点击删除,重新绑定grid,产生错误在ApplicationsGrid_OnDelete()第3行,但数据库中相应的数据已经成功删除。注释掉第5行(不是第3),以第6行的代码来刷新页面问题解决。虽然问题解决了,但不知道为什么原来的程序怎么会有如此诡异的错误(BindApplications()好像也没什么问题吧)。 1protected void Applicatio... 阅读全文

posted @ 2006-05-12 09:36 阿贵 阅读(877) 评论(3) 推荐(0)

按日期查询

摘要: --select * from 表 where convert(char(10),字段,120)=convert(char(10),@date,120)遇到按时间查询上下界的问题,可按上面的例子将时间字段和传进来的时间参数同时“convert” 阅读全文

posted @ 2006-05-12 09:06 阿贵 阅读(405) 评论(0) 推荐(0)