社区
Web 开发
帖子详情
如何上传一个 word 文档到 Sql Server 的数据库中并可将其在本地还原,最好有代码分析,谢了
liqweijack
2003-09-12 10:40:16
如何上传一个 word 文档到 Sql Server 的数据库中并可将其在本地还原,最好
有代码分析,谢了
...全文
76
2
打赏
收藏
如何上传一个 word 文档到 Sql Server 的数据库中并可将其在本地还原,最好有代码分析,谢了
如何上传一个 word 文档到 Sql Server 的数据库中并可将其在本地还原,最好 有代码分析,谢了
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
gjd111686
2003-09-12
打赏
举报
回复
<%@ page contentType="text/html; charset=gb2312"%>
<%@ include file="/DataIni/DataOpen.jsp"%>
<%@ include file="/ScriptLib/Init.jsp"%>
<%
InputStream InData=null;
int iSize,iLength;
iLength=request.getContentLength();
byte[] Buffer=new byte[iLength];
byte[] Byte_File;
if(iLength>0)
{
InData=request.getInputStream();
String ContentType=request.getContentType();
iSize=InData.read(Buffer);
if(iSize!=-1)
{
//数据处理开始
String FileData=new String(Buffer);
//正则字串:"name=\"";
//正则字串:"filename=\"";
String strSplit=ContentType.substring(ContentType.lastIndexOf("=")+1,ContentType.length());
String strSub[]=FileData.split(strSplit);
String strElement;
int iBegin,iEnd;
iBegin=0;iEnd=0;
String FieldName,FieldValue;
int bTrue;
bTrue=0;
int iPos;
iPos=0;
int iLocation;
iLocation=0;
for(int iIndex=0;iIndex<strSub.length;iIndex++)
{
strElement=strSub[iIndex];
iBegin=strElement.indexOf("name=\"",0);
if(iBegin!=-1)
{
iEnd=strElement.indexOf("\"",iBegin+6);
FieldName=strElement.substring(iBegin+6,iEnd);
iBegin=strElement.indexOf("filename=\"",0);
if(iBegin!=-1)
{
bTrue=1;
}
//
iEnd=strElement.indexOf("\r\n\r\n",0);
if(bTrue==1)
{
iLocation=0;
iPos=FileData.indexOf("filename=\"",iPos);
iPos=FileData.indexOf("\n",iPos)+1;
iPos=FileData.indexOf("\n",iPos)+1;
iPos=FileData.indexOf("\n",iPos)+1;
iLocation=FileData.indexOf(strSplit,iPos)-4;
FieldValue=FileData.substring(iPos,iLocation);
byte[] Byte_File_=FieldValue.getBytes();
Byte_File=new byte[Byte_File_.length];
for(int kIndex=0;kIndex<Byte_File_.length;kIndex++)
{
Byte_File[kIndex]=Buffer[iPos+6+kIndex];
}
session.putValue(FieldName,Byte_File);
}
else
{
FieldValue=strElement.substring(iEnd+4);
session.putValue(FieldName,FieldValue.substring(0,FieldValue.indexOf("\n")-1));
}
bTrue=0;
}
}
//数据处理结束
String TypeValue,Id;
TypeValue=(String)session.getValue("TypeValue");
if(TypeValue!=null)
{
int iDoAction;
iDoAction=0;
if(TypeValue.indexOf("Add",0)!=-1)
{iDoAction=1;}
if(TypeValue.indexOf("Modify")!=-1)
{iDoAction=2;}
if(TypeValue.indexOf("Del")!=-1)
{iDoAction=3;}
odbcQuery="";
Id=(String)session.getValue("RecordId");
switch(iDoAction)
{
case 1:
odbcQuery="insert into Link(SiteName) values(null)";
odbcStmt.executeUpdate(odbcQuery);
odbcQuery="select * from Link";
odbcRs=odbcStmt___.executeQuery(odbcQuery);
odbcRs.last();
odbcRs.updateString("SiteName",(String)session.getValue("SiteName"));
odbcRs.updateString("SiteURL",(String)session.getValue("SiteURL"));
byte[] m_ByteArray=(byte[])session.getValue("SiteLogo");
odbcRs.updateBinaryStream("SiteLogo",new ByteArrayInputStream(m_ByteArray),m_ByteArray.length);
odbcRs.updateRow();
response.sendRedirect("/System/Link/List.jsp");
break;
case 2:
odbcQuery="select * from Link where ID="+Id;
odbcRs=odbcStmt___.executeQuery(odbcQuery);
odbcRs.first();
odbcRs.updateString("SiteName",(String)session.getValue("SiteName"+Id));
odbcRs.updateString("SiteURL",(String)session.getValue("SiteURL"+Id));
byte[] n_ByteArray=(byte[])session.getValue("SiteLogo"+Id);
odbcRs.updateBinaryStream("SiteLogo",new ByteArrayInputStream(n_ByteArray),n_ByteArray.length);
odbcRs.updateRow();
response.sendRedirect("/System/Link/List.jsp");
break;
case 3:
odbcStmt.executeUpdate("delete from Link where ID="+Id);
response.sendRedirect("/System/Link/List.jsp");
break;
}
}
}
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
<link rel="stylesheet" type="text/css" href="/StyleLib/Default_Style_Sheet.css">
</head>
<body onload="window.alert('动作失败,系统取消操作!');window.location.href='/System/Link/List.jsp';">
<%@ include file="/TemplateLib/Head.jsp"%>
<%@ include file="/TemplateLib/Tail.jsp"%>
<%@ include file="/DataIni/DataClose.jsp"%>
</body>
</html>
gjd111686
2003-09-12
打赏
举报
回复
<form action="Result.jsp" method="post" name="LinkForm" enctype="multipart/form-data">
<script>
function LinkSubmit(TypeValue,Id)
{
LinkForm.TypeValue.value=TypeValue;
LinkForm.RecordId.value=Id;
LinkForm.submit();
}
function ShowLogo(SiteName,SiteURL,Id)
{
var hwnd=window.open('','','');
hwnd.document.write("<a href='"+SiteURL+"'><img src='/System/Link/ShowLogo.jsp?Id="+Id+"' title='网站名称:"+SiteName+"' width=80 height=30 border=0></a>");
}
</script>
<input type="hidden" name="TypeValue" size="10" value="">
<input type="hidden" name="RecordId" size="10" value="">
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td width="10%" class="TdClass_Head">友情链接</td>
</tr>
</table>
<br>
<table border="0" width="80%" cellspacing="0" cellpadding="0">
<tr>
<td width="20%" class="TdClass_0">网站名称</td>
<td width="20%" class="TdClass_0">网站地址</td>
<td width="40%" class="TdClass_0">网站标识</td>
<td width="20%" class="TdClass_0">执行操作</td>
</tr>
<tr>
<td width="20%" class="TdClass_1"><input name="SiteName" size="10" value=""></td>
<td width="20%" class="TdClass_1"><input name="SiteURL" size="10" value=""></td>
<td width="40%" class="TdClass_1"><input type="file" name="SiteLogo" size="10" value=""><a href="#">浏览标识</a></td>
<td width="20%" class="TdClass_1"><input type="button" onclick="LinkSubmit('Add','NULL')" value="增加" id=Add name=Add>
</tr>
<%
odbcQuery="select * from Link";
odbcRs=odbcStmt.executeQuery(odbcQuery);
String Id,SiteName,SiteURL;
int iCount;
iCount=0;
while(odbcRs.next())
{
Id=odbcRs.getString("ID");
SiteName=odbcRs.getString("SiteName");
SiteURL=odbcRs.getString("SiteURL");
if(iCount%2==0)
{
%>
<tr>
<td width="20%" class="TdClass_0"><input name="SiteName<%=Id%>" size="10" value="<%=SiteName%>"></td>
<td width="20%" class="TdClass_0"><input name="SiteURL<%=Id%>" size="10" value="<%=SiteURL%>"></td>
<td width="40%" class="TdClass_0"><input type="file" name="SiteLogo<%=Id%>" size="10" value=""><a href="#" onclick="ShowLogo('<%=SiteName%>','<%=SiteURL%>','<%=Id%>')">浏览标识</a></td>
<td width="20%" class="TdClass_0"><input type="button" onclick="LinkSubmit('Modify','<%=Id%>')" value="修改" id=Modify name=Modify><input type="button" onclick="LinkSubmit('Del','<%=Id%>')" value="删除" id=Del name=Del></td>
</tr>
<% }else{%>
<tr>
<td width="10%" class="TdClass_1"><input name="SiteName<%=Id%>" size="10" value="<%=SiteName%>"></td>
<td width="10%" class="TdClass_1"><input name="SiteURL<%=Id%>" size="10" value="<%=SiteURL%>"></td>
<td width="10%" class="TdClass_1"><input type="file" name="SiteLogo<%=Id%>" size="10" value=""><a href="#" onclick="ShowLogo('<%=SiteName%>','<%=SiteURL%>','<%=Id%>')">浏览标识</a></td>
<td width="10%" class="TdClass_1"><input type="button" onclick="LinkSubmit('Modify','<%=Id%>')" value="修改" id=Modify name=Modify><input type="button" onclick="LinkSubmit('Del','<%=Id%>')" value="删除" id=Del name=Del></td>
</tr>
<%
}
iCount++;
}
odbcRs.close();
%>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td width="100%" class="TdClass_Head"><input type="button" value="返回" id="Return" name="Return" onclick="window.location.href='/System/Index.jsp'"></td>
</tr>
</table>
</form>
(完整
word
版)`
SQL
-
Server
-2008R2
数据库
备份与
还原
操作
文档
.doc
(完整
word
版)`
SQL
-
Server
-2008R2
数据库
备份与
还原
操作
文档
.doc
企业人事管理系统(C#+
Sql
server
)
根据企业对人事管理的要求,本系统可以实现以下目标: 操作简单方便、界面简洁美观。 在查看员工信息时,可以对当前员工的家庭情况、培训情况进行添加、修改、删除的操作。 方便快捷的全方位数据查询。 按照指定的条件对员工进行统计。 可以将员工信息以表格的形式插入到
Word
文档
中
。 实现
数据库
的备份、
还原
及清空的操作。 由于该系统的使用对象较多,要有较好的权限管理。 能够在当前运行的系统
中
重新进行登录。 系统运行稳定、安全可靠。
SQL
Server
数据库
基础到精通课程
本课程是陈表达在学习
SQL
server
数据库
后做的完整笔记,本课程讲解从最开始的 创建
数据库
、创建数据表、已经数据的写入、查询、修改更新、删除,字段运算、字段运算统计、分类汇总、数据
分析
、条件判断,条件筛选及...
SQL
Server
2008商业智能完美解决方案 1/3
完整清晰 PDF 扫描
文档
这个PDF文件是我花钱买来的,现在为了挣积分,拿出来与大家分享!!
SQL
Server
2008商业智能完美解决方案 1/3
SQL
Server
2008 2010 商业智能完美解决方案 作者:兰吉特(Lynn Langit) 出版社:人民邮电出版社; 第1版 (2010年8月1日) ISBN:7115231117, 9787115231116 页码:545 -------------------------------------------------------------------------------- 《
SQL
Server
2008商业智能完美解决方案》: 利用Microsoft
SQL
Server
2008实现灵活的商业智能解决方案使用Microsoft 完善的BI工具构建B0解决方案的必备指南,使用
SQL
Server
2008设计、开发和部署更有效的数据集成、报表、
分析
解决方案所需的权威操作指南。不论是商业智能(B0)编程的新手还是老手,都会从
中
受益。通过专家团队的真实示例和高明见解,读者能够掌握构建商业智能解决方案的概念、工具和技术,从而真正提供客户所需的智能性商业价值。 《
SQL
Server
2008商业智能完美解决方案》研究如下内容: 管理开发生命周期,打造BI团队; 深入研究
SQL
Servet Analysis Services、Integration Services和 Reporting Services; 使用Business Intelligence Development Studio(BIDS); 编写对销售数据进行分级、排序和深化的查询; 开发提取、转换、加载(ETL)解决方案; 添加源
代码
控制系统; 通过加密和凭据保护部署的包; 用MDX和DMX查询设计器构建基于OLAP多维数据集和数据挖掘模 型的报表; 用NET
代码
建立并实现自定义对象; 在Microsoft Office Excel和Office SharePoint
Server
中
查看报表。 微软公司US-
SQL
Analysis Services 首席开发经理Donaod Farmer倾力作序 内容提要 -------------------------------------------------------------------------------- 《
SQL
Server
2008商业智能完美解决方案》介绍如何使用Microsoft
SQL
Server
2008开发商业智能(BI)解决方案。《
SQL
Server
2008商业智能完美解决方案》共分为4部分。第一部分阐述了商业智能基础、可视化商业智能结果、构建有效的商业智能流程、商业智能解决方案的物理架构、面向架构师的OLAP逻辑设计概念;第二部分面向Analysis Services开发人员,详细介绍了如何使用BIDS以及BIDS的所有功能,提供了使用SSAS构建OLAP多维数据集和数据挖掘模型的指南;第三部分面向Integration Services开发人员,详细介绍如何使用SSIS开发ETL软件包,利用ETL包加载OLAP多维数据集和数据挖掘结构;第四部分详细介绍了SSRS的架构,以及Excel、Visio或Office SharePoint
Server
2007作为BI客户端的实现。 《
SQL
Server
2008商业智能完美解决方案》结合专家团队提供的实际示例和丰富经验进行介绍,让读者能够直观轻松地掌握构建商业智能(BI)解决方案的概念、工具和技术,是一本不可多得的商业智能开发参考指南。无论是商业智能(BI)编程新手还是经验丰富的老手,都可从《
SQL
Server
2008商业智能完美解决方案》
中
获益。 目录 -------------------------------------------------------------------------------- 第一部分 面向商业决策者和架构师的商业智能 第1章 商业智能基础 3 1.1 商业智能和数据建模 3 1.2 OLTP和OLAP 4 1.2.1 联机事务处理 4 1.2.2 联机
分析
处理 6 1.3 常用BI术语 9 1.3.1 数据仓库 9 1.3.2 数据市场 10 1.3.3 多维数据集 11 1.3.4 决策支持系统 11 1.3.5 数据挖掘系统 11 1.3.6 提取、转换和加载系统 12 1.3.7 报表处理系统 12 1.3.8 关键绩效指标 12 1.4 Microsoft BI解决方案的核心组件 12 1.4.1
SQL
Server
2008 Analysis Services 13 1.4.2
SQL
企业人事管理系统(c#+
SQL
Server
2005)源码
根据企业对人事管理的要求,本系统可以实现以下目标: 1.操作简单方便、界面简洁美观。 2.在查看员工信息时,可以对当前员工的家庭情况、培训情况进行添加、修改、删除的操作。 3.方便快捷的全方位数据查询。 4.按照指定的条件对员工进行统计。 5.可以将员工信息以表格的形式插入到
Word
文档
中
。 6.实现
数据库
的备份、
还原
及清空的操作。
Web 开发
81,094
社区成员
341,710
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章