fengrengui

导航

2006年5月12日

.NET在SQL Server中的图片存取技术

摘要: 本文总结如何在.Net WinForm和.Net WebForm(asp.net)中将图片存入SQL Server中并读取显示的方法 。1.使用asp.net将图片上传并存入SQL Server中,然后从SQL Server中读取并显示出来:1)上传并存入SQL Server 数据库结构 create table test { id identity(1,1), FImage image } 相... 阅读全文

posted @ 2006-05-12 10:16 阿贵 阅读(126) 评论(0) 推荐(0)

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)

C#导出Excel的函数(可根据实际需要进行相应修改)

摘要: //导出Excel的方法 private void ExportExcel() { DataSet ds=dtsSelect;//数据源 if(ds==null) return; string saveFileName=""; bool fileSaved=false; SaveFileDialog saveDialog=new SaveFileDialog(... 阅读全文

posted @ 2006-05-12 09:15 阿贵 阅读(25872) 评论(12) 推荐(1)

Javascript中Window.open参数详解

摘要: 关于Window.open的参数小结(参书改编) 先看一个例子: [javascipt:]window.open("Webpage.asp?",Derek,"height=100,width=100,status=yes,toolbar=yes, menubar=no,location=no"); 此语句打开一个新窗口,页面为webpage.asp,参数为var,名字为Derek,高为100,宽为... 阅读全文

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

按日期查询

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

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

SQL日期转换

摘要: select CONVERT(varchar, getdate(), 120 )2004-09-12 11:06:08select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')20040912110608select CONVERT(varchar(12) , getdate(),... 阅读全文

posted @ 2006-05-12 08:59 阿贵 阅读(2041) 评论(0) 推荐(0)