复件 topic.gif
复件 topic.gif

ASP+SQL图书管理系统

收藏

资源目录
跳过导航链接。
压缩包内文档预览:
预览图
编号:58899305    类型:共享资源    大小:881.58KB    格式:RAR    上传时间:2020-03-17 上传人:qq77****057 IP属地:江苏
7.2
积分
关 键 词:
ASP SQL 图书 管理 系统
资源描述:
ASP+SQL图书管理系统,ASP,SQL,图书,管理,系统
内容简介:
新疆大学本科毕业论文质量评价指标(专家用表)1. 二级指标中每项的评价等级为A、B、C、D,对应的等级值是各等级所代表的百分比,即A代表100%,B代表80%,C代表60%,D代表40%。2. 各项得分=该项分数值该项等级值。分数值即表中各项所列出的对应分数,例如:2-3“外文应用能力”,该项分值为9分,如果该项等级为B,等级值为80%,则2-3项所得分数为:980%=7.2。评价总分为100分, 是各项得分之和。 3. 评价最终结果分为五个等级:优秀、良好、中等、合格、不合格。等级划分标准:优秀:总成绩90分;良好:90总成绩80分;中等:80总成绩70分;合格:70总成绩60分;不合格:总成绩60分。一级指标二级指标等级标准评价等级得分总分一、选题质量(25分)1-1选题指导思想6分A.选题紧紧围绕本专业培养目标,充分满足毕业论文教学基本要求。B.选题围绕本专业培养目标,满足毕业论文教学基本要求。C. 选题能按照本专业培养目标,基本满足教学基本要求。D.选题不能按照本专业培养目标,不满足教学基本要求。1-2题目难度6分A.题目能综合本专业基本理论、基本知识和基本技能,着重强调培养创新能力和综合素质,选题新颖。B.题目基本能体现教学计划中对“三基”和能力知识结构的基本要求,选题有新意。C.题目尚能体现教学计划中对“三基”和能力知识结构的基本要求,选题有一定的新意。D.题目体现不出教学计划中对“三基”和能力知识结构的基本要求,选题无新意。1-3工作量6分A.题目大小适中,超过计划周数95%的工作量。B.题目大小基本适中,达到计划周数85%的工作量。C.题目工作量大小尚可,达到计划周数75%的工作量。D.从查阅文献开始,少于计划周数65%的工作量。1-4 结合实际7分A.题目紧密结合生产、教学和科研的实际问题,真题真做。B.题目结合生产、教学和科研的实际问题,真题真做。C.题目尚能结合实际问题,基本上真题真做。D.题目不能结合实际问题。二、能力水平(35分)2-1 综合运用知识能力8分A.紧紧围绕选定课题, 综合运用所学知识和技能进行分析、论证,知识面广,运用恰当,分析和解决问题的能力强。B. 围绕选定课题, 能综合运用所学的知识和技能进行分析、论证,知识面广,运用恰当,具备分析和解决问题的能力。C.能将所学的知识和技能用于毕业论文中,且运用基本得当,有一定分析和解决问题的能力。D. 不能运用所学知识解决问题。二、能力水平(35分)2-2 调研及应用文献资料能力9分A.试验及调研报告内容完整, 层次清楚, 文字简洁通顺;能独立检索文献资料, 引用的参考文献理工类15篇以上,其他学科20篇以上, 且著录格式符合国标规范要求。B.试验及调研报告内容完整, 文字通顺; 能独立检索文献资料, 在论文中引用的参考文献在10篇以上, 且著录格式符合国标规范要求。C.试验及调研报告基本完整清晰, 文字基本通顺;引用的参考文献不少于5篇, 著录格式基本符合国标规范要求。D.试验及调研报告不完整, 文字不通顺;在论文中引用的参考文献少于5篇。2-3 外文应用能力9分A.能熟练运用一门外语, 翻译字数不少于3000字的与本专业相关的外文文献, 译文准确流畅。B.能运用一门外语, 翻译字数不少于1500字的与本专业相关的外文文献, 译文尚流畅,无原则性错误。C. 运用外语能力较差,翻译字数少于1500字,译文一般,有小部分错误。D.无译文。2-4 计算机应用能力9分A.能独立操作, 熟练使用现有软件, 毕业论文统一用A4纸打印, 论文中涉及的图表统一用计算机绘制。B. 能独立操作,会使用现有软件,毕业论文使用计算机打印。C.基本上能独立操作现有软件,毕业论文能使用计算机打印。D.不会使用计算机。三、论文质量(40分)3-1 论文撰写水平15分A.论文观点正确,论据充分,论证逻辑性强;结构严谨,条理清楚,文字表述准确精练,条理性强。B.论文论点比较明确,论据较充分,论证逻辑性较强;所用专业语言无错误。C.论点基本正确,论据较可靠,论证尚合乎逻辑;所用专业语言无原则性错误。D.论点不正确,论据不可靠,论证不合乎逻辑;所用专业语言有错误。3-2 规范程度15分A.中英文摘要和论文字数符合要求,装帧美观、规范。B.装帧一般,规范化程度比较高。C.装帧尚可,规范化程度一般。D.无装帧,不规范。3-3创新性及成果价值10分A.论文具有创新性,且有较强的学术价值或应用价值。B.论文有创意,有应用价值。C.论文创意一般,有一定参考价值。D. 无创意。新疆大学本科生毕业论文(设计)中期检查表学生姓名谢贵文学院班级信息学院计算机03-7指导教师任疆红论文(设计)题目图书管理系统已 完 成 的 任 务系统分析,需求分析,总体设计,详细设计,数据库设计,图书管理系统编码。是否符合任务书要求进度是尚 须 完 成 的 任 务图书查询功能,超期统计功能,以及三层用户使用的登陆功能。能否按期完成任务可以存在的问题和解决办法用户包括游客,一般用户,管理员,还未实现让他们在同一页面进行登陆;图书查询有多个条件,比如书名,分类,出版社等。还有要实现模糊查询;超期统计也还未实现,数据库日期与页面日期还没有转化为同样的格式。 填表人 任疆红 日期 2006.4.25教研室主任签字: 教学副院长(主任)签字:新 疆 大 学毕业设计(论文)任务书班 级: 计算机 03-7 姓 名: 谢贵文 论文(设计)题目: 图书管理系统 专 题: 要求完成的内容:在需求分析和资料搜集的基础之上,进行系统分析、需求分析、数据库设计,界面设计,编写代码,并进行测试。设计主要完成图书信息的添加,删除,修改,查询以及包括游客,用户,管理员多级用户的使用,具备友好的操作环境、方便的管理功能,使之成为比较完备的管理系统 。 发题日期2005年 12月 13日 完成日期2005年5月25日实习实训单位: 地点: 论文页数: 页; 图纸张数: 指导教师: 任疆红 教研室主任: 院长(系主任): 声 明郑重声明:论文(设计)系本人在相关教师指导下独立完成,本人拥有自主知识产权,没有抄袭、剽窃他人成果,由此造成的知识产权纠纷由本人负责。信息科学与工程学院 计算机03-7班姓名: 在SQL Server数据库里存储Session谢贵文HTTP是个状态很不确定的协议,为了允许用户通过请求保存状态信息,ASP.NET提供了Session存储机制。这些Session变量按每个用户被存储起来。在传统的ASP里,你只能在Web服务器的内存里暂时存储Session变量,但是这个方法已经被证明了在扩展性和可依赖性上的不足。在ASP.NET里,你可以为你的每个请求定制Session状态存储。本文将探讨存储Session变量可伸缩性和可靠性都很好的方式之一的SQL Server 。在传统的ASP里 ,默认的Session状态保存在服务器的内存中。 但是,这种做法带来两方面的问题:(1)它让服务器超负荷,影响了网站服务器的伸缩性能。(2)它不能有效地应用于Web服务器群。让我在一些细节上讨论这些问题,使你能为你选择了Session存储感到庆幸。 Session变量依据每个用户为基础生成。 默认情况下,它们都保留在Web服务器的内存中。 想象一个有着成千上万用户的网站。 由于巨大的用户数量, Web服务器存储的活跃Session的数目也将非常的多。 这意味着你存放着非常多的session数据在Web服务器的内存中。 如果不断的对服务器增加负载, 它可能达到饱和,以至造成对应用程序整体扩展性能上的不良影响。 为了解决这个影响到扩展性能的问题,实现Web集群。所谓的 Web集群是一组网络服务器并行运行, 服务器集群里的每个Web服务器都有您的网站的一个镜像。您的网站的流通负载平均分配给每个可用的服务器,从而达到负载平衡。 在Web服务器的内存里存储Session变量会阻碍Web集群的建立,下面将举例来说明: 假定有三个Web服务器:S1 , S2 ,和S3 。并行地连接在一起接受用户请求。 假定这个时候有一个请求R1来到服务器集群并且负载平衡逻辑判定 S2,S3都因为某些其他的任务而没有空闲,但是S1可以处理这个请求。很显然,这个请求会被送到S1进行处理。现在,想象在这个处理过程当中你在S1的内存中存储了某个Session变量。到目前为止,一切还很好。过了一些时间,同样的用户有了另一个请求R2,这个请求需要上一个请求所存储的Session变量。但是这个时候S1已经被一些任务使用着,而S2,S3却处于空闲的状态。你可以猜到根据每一条的负载平衡规则,R2将会被送到S2进行处理。但是,如果那发生了,S2怎么能够得到Session变量?毕竟,它们存储在和S2完全没有任何关联的Web服务器S1的内存中。这意味着R2仍然得等待S1的空闲。这种事情很显然是Web服务器群资源的浪费。 ASP.NET 2.0及其Session信息存储ASP.NET 2.0允许你存储session变量在三个不同地方:(1)在网站服务器的内存中存储(进程中的)。 (2)在一台专门用来存放Session变量的服务器中存储。( Session状态信息存储服务器 )(3)在一个SQL Server的数据库里面存储。默认情况是第一种存储模式。 模式二和模式三通常被称为“进程外”的模式,因为Session变量的存储和Web站点没有关系。 在这篇文章,你将被限制在只探索第三种模式。在SQL Server数据库里存储Session变量具有以下优点: (1)可扩展性: 如果您正在找一个高度可扩展性的方法来储存Session变量 ,SQL Server正是如此,它比其它的可扩展性更好。 Web服务器群可以很容易地获取Session变量,因为它们都储存在一个独立的数据库。(2)可靠性:因为数据是很真实的存放在数据库里面,它比其他方法都要好。不用去担心服务器重启的问题。(3)安全: SQL Server比在内存或Session状态信息存储服务器中更安全。 你可以更简单的通过配置SQL Server的安全选项来保护你的数据。在web.config 文件里,可以通过定义一个来配置Session状态模式 。 备注:如果是在Web服务器群里, Web服务器群的每一台服务器的IIS METABASE的应用程序路径应该是完全相同的。Session结束事件不会因为任何进程之外的模式发生。配置SQL Server来储存Session状态在你真正的在SQL Server存储Session状态之前, 你需要先配置它。 配置工作都是通过一个名为aspnet_regsql.exe的命令行工具来完成的。 在SQL Server里面,你可以在三个可能的地点存储Session状态, (1)临时存储: 在这种情况下,Session状态保存在SQL Server的tempdb 数据库里面。 该工具建立一个数据库名为aspstate并增加特定的存储过程来管理要保存的Session信息。 这个工具还创建tempdb 数据库所需的表。 如果您重新启动SQL Server服务,Session信息不会丢失。 (2)持久存储: 该工具建立一个数据库名为aspstate并增加特定的存储过程来管理要保存的Session信息。 Session状态信息储存在aspstate数据库里。 这种方法的优点是,即使您重新启动的SQL Server 。 Session信息也不会丢失。 (2)定制存储:Session状态信息和数据存储过程都有用户定制存储。 同时数据库的名称必须在配置文件中声明。 下面的表列出了这个工具与Session存储配置相关的各种命令行开关:命令行开关备注-S 指定你想要存储Session状态信息的SQL Server服务器的IP地址或者服务器名。-U指定和SQL Server连接时使用的用户名。-P指定和SQL Server连接时使用的用户的密码。-E指出你想要连接的SQL Server服务器需要完整的安全策略-ssadd添加支持服务器模式的session状态-ssremove移除支持服务器模式的session状态-sstypeSession状态支持的类型,一下是可以支持的类型:t 代表临时存储p 代表持久存储c 代表定制储存-d 用于使用的数据库的名字如果要转换-sstype,就用命令“c“表单和创建的存储过程作为一个开发人员, 你可能从来无法直接影响session状态数据库。 然而, 当你运行ASPNET_REGSQL.EXE 工具, 你将会对表单和数据库的创建会有一个很好的理解。配置 1:在SQL数据库服务器中创建表单配置 2:在数据库服务器中创建存储过程配置你的网站来存储Session 状态一旦你配置你的SQL服务器来支持session状态存储,下一步就是配置你的网站了。web.config 的标记允许你指定session存储的信息。下列的表中列出了一些这个标记得重要属性:属性描述modeMode属性可以使用一下的几个值: Off:指示这个session状态关闭.InProc: 指示这个session 将被存储在web服务器的内存中。这是默认的设置 StateServer:指示这个session将被储存在一个状态服务器中 SQLServer: 指示这个session将被储存在一个SQL服务器的数据库中.Custom: 指示你将会有一个定制的session存储机制,这个机制使用了ASP.NET的提供的模式sqlConnectionString如果模式被设置为SQL服务器,你必须指定这个属性。这个属性指定了那个SQL服务器数据库的连接字符串。这个数据库的是用来进行状态的存储的。注意,如果你使用了临时的或者持久的存储选项时候,你不需要在连接字符串中指定数据库的名称(见上)。allowCustomSqlDatabase如果你想去存储session状态在一个你自己的SQL服务器的数据库中的时候,你必须设置这个属性为“TRUE”。一旦这个属性被设置为true,你要在上面说描述的连接字符串中指定数据库的名称。例子你可以开发一个简单的网站,设置它来存储一个在SQL服务器数据库中的sesseion状态,来示例你到目前为止所学的东西。设置SQL服务器打开Visual Studio.NET 2005命令提示器,使用一下命令aspnet_regsql -ssadd -S .sqlexpress -E -sstype paspnet_regsql -ssadd -S .sqlexpress -E -sstype p现在,你正在使用带着完整安全属性的SQL Express数据库。配置 3 展示了一个把带着session 状态类型的工具设置为persistent的例子。配置3:运行_regsql.exe工具创建和配置一个网站现在,创建一个新的网站,修改web.config文件成下列的代码这里,你添加了这个标记,设置它的模式属性为SQLServer。你还要指定sqlConnectionString属性,把它指向你的SQL SERVER。创建测试网站的WEB窗体在WEB站点中添加两个WEB窗体。这两个窗体分别叫page1.aspx和page2.aspx。第一个WEB窗体将显示一个产品列表来选择。被选择的产品被保存在一个DataSet中。然后通过保存这个DataSet 在一个session变量中来把它在请求中传递。第二个Web窗体简单的显示了来自DataSet中的被选择的产品。通过一下的步骤来完成第一个Web 窗体: 拖拉一个GRIDVIEW控件和一个SQL Data Source控件在WEB FORM上. 配置SQL Data Source, 从Northwind 数据库的Products 表中选择ProductID, ProductName, 与 UnitPrice columns 通过设置他的DataSourceID属性到SQL Data Source控件的ID属性上来绑定GridView到SQL Data Source上. 在GridView的samrt标记上, 点击Allow Selection checkbox. 添加一个HyperLink 控件,设置NavigateUrl属性到Page2.aspx. 创建一个 DataSet 和 DataTable. FataTable 包含两个DataColumns: ProducyName 和 Qty. 然后你存储一个session变量myds.当用户选择一个产品的时候, 你可以创建一个新的DataRow, 分配产品的资料给它, 添加这个ROW去DataTable. 用户的选择可以在跨多个请求中持续. 按一下的步骤创建第二张的Web form 拖拉一个GridView到Web form上. 添加两个绑定区域 设置第一个绑定区域的HeaderText属性成Product Name. 同样的,设置DataField成Product Name. 设置第二个绑定区域的HeaderText属性成Quantity. 同样的,设置DataField成 Qty . 添加下列的代码到第二张Web Form 的 Page_Load event handler上protected void Page_Load(object sender, EventArgs e) GridView1.DataSource=(DataSet)Sessionmyds; GridView1.DataBind();这里,你设置GridView控件的DataSource属性到你的储存在session上的DATASET.然后你通过调用DataBind() 方法来绑定GridView.运行WEB FORMS 的例子为了测试你的WEB FORMS, 设置Page.aspx 作为你的起始页, 然后运行你的WEB SITE. 你应该看到如图4所展示的:Figure 4: 运行Page1.aspx 的例子 通过”Add to cart”按钮选择一些产品. 这将会添加一些行在DataTable上. 记得你正在存储你的DataSet在一个session变量之中. 然后,通过点击”Show mycart” 超链接导航到 Page.aspx . 图5显示了带着前面所选的产Page.aspx. 配置 5: 运行Page2.aspx的例子正如你所见的, Page2.aspx 正确的显示了你在前页所选的那些条目. 这显示你的session 变量被真正的存储在了SQL服务器的数据库中,并被在第二页中找回. 还有, 注意你在无关储存模式的session中用了相同的存储调用值得标记.储存Session状态在SQL服务器中的劣势虽然存储session状态在SQL 服务器中可以使你的网站更容易拓展和更稳定. 但是这个技术有一下的几个劣势执行上: 在执行的几个项目中,一个基于SQL SERVER的session 存储可能是一个最慢地选择. 因为你的session变量是存储在物理的数据库中.它用了更多的时候去存储和读取数据库. 这会影响了你的网站的运行速度. 花费: 因为你存储你的数据在数据库中, 你需要一个SQL数据库的执照, 这将给你的网站带来额外的开销. 连续的数据: 这个方法要求你所有保存在session变量中的数据必须是连续的如果你想存储数据在一个session中,这也许强制你去标记你自己的类作为Serializable.总结ASP.NET 2.0 可以允许你存储session状态到一个SQL服务器的数据库中。 ASPNET_REGSQL.EXE工具配置了数据库来支持这个特性。更进一步, 标记配置你的网站来支持这个模式。 存储一个session状态在一个SQL服务器中是一种更具拓展,安全性和稳定性的选择。虽然, 这种选择的运行相对于其他选择而言将会更慢。9新疆大学毕业论文(设计)题 目: 图书管理系统 指导老师: 任疆红 学生姓名: 谢贵文 所属院系: 信息科学与工程学院专 业: 计算机科学与技术 班 级: 计算机03-7 完成日期: 2007年5月25号新疆大学本科生毕业论文(设计)指导记录学生姓名谢贵文指导教师任疆红学院、班级信息科学与工程学院 计算机03-712月10日 下达毕业论文(设计)任务书,明确目标。12月20日 布置寒假的主要任务是进行需求分析和学习软件工具,完成文献综述和外文翻译。 3月1日 检查文献综述和外文翻译,已经完成。3月27号完善需求分析,搭建开发环境,寻找资料,清楚要实现的功能。4月6号进行数据库的设计。4月10号完成图书管理系统的详细设计以及部分用户界面的设计。4月17日根据前面的分析和设计进行系统的编码。5月4日完成编码。要保持良好的编码风格。5月13日对系统的界面作比较基本的美化工作。5月17日对系统作一个基本的测试。第 页 共 页摘 要随着Internet技术的发展,互联网在中国逐步普及,人们对网络的需求也日益增长,利用计算机实现事务的管理势在必行。本系统从初步调查开始,详细介绍了需求分析、流程和数据分析,并进行了系统总体结构设计和数据库设计. 系统采用Dreamweaver编写ASP脚本,SQL SERVER 2000建立数据库,从界面简洁、实用的要求出发,完成了图书管理工作的主要部分,包括图书和用户的信息浏览,添加,修改,删除,查询,并且实现了超期统计和用于提醒超期用户的站内发消息功能。关键字: Dreamweaver; SQL Server 2000; ASPABSTRACTWith the development of Internet technology, the Internet in China has gradually become popular, Peoples demand of network growing too, its imperative to use computer for the implementation of works management .The system started from the preliminary investigation, a detailed needs analysis, process and data flow analysis, and the overall structure of the system design and database design. The System Use Dreamweaver to develop the ASP feet, SQL SERVER 2000 to create database, with simple interface and practical requirements. The System completed a major part of books management, including books and users information browse, add, modify, delete, search and the implementation of the extended statistics and message sending. Keyword: Dreamweaver; SQL Server 2000; ASPStoring Session State in a SQL Server DatabaseIntroductionHTTP is a stateless protocol. To allow users save to state information across requests, ASP.NET provides Session storage. The session variables are stored on per-user basis. In ASP classic, you can store session variables only in the Web servers memory. However, this approach proves to be poor in terms of scalability and reliability. In ASP.NET 2.0, however, you can customize the session state store as per your requirement. This article will explore one of the scalable and reliable approaches for storing session variablesSQL Server.As in classic ASP, by default the session state is maintained in the Web servers memory. However, this approach poses two problems:It overburdens the server, affecting the Web sites scalability It cannot be used effectively in Web farm scenarios Let me discuss these problems in a bit of detail so that you can appreciate your choice of a session store.Session variables are created on a per-user basis. By default, they are maintained in the Web servers memory. Imagine a Web site with thousands of users. Because of the huge number of users, the number of active sessions on the Web server also will be vary high. That means you are storing too much data in the Web servers memory. If the load on the server keeps of increasing, it may reach saturation and cause trouble for overall scalability of your application.To tackle the issue of scalability mentioned above people, implement Web farms. A Web farm is a cluster of Web serves running in parallel. Each Web server in the cluster has a mirror of your Web site. The traffic of your Web site is equally distributed among the available servers, thus providing load balancing. Storing session variables in the Web servers memory can hamper the Web farms architecture. Assume that there are three Web serversS1, S2, and S3connected in parallel and serving the incoming requests. A request R1 comes into the cluster and the load balancing logic decides that S2 and S3 are busy with some other task, but S1 is free to process your request. Naturally, the request gets forwarded to S1 for processing. Now, imagine that during the processing, you store a session variable in S1s memory. So far, so good. After some time, the same user gives another request, R2, that needs the session variable stored by the previous request, R1. However, this time S1 was occupied with some work and S2 and S3 are free. You would expect that as per the load-balancing rule, R2 should get forwarded to S2 or S3. But, if that happens, how will R2 get access to the session variables? After all, they are stored in the memory of the altogether-separate Web server S1. This means R2 still needs to wait for S1 to become free. This is, of course, a poor use of Web farm resources.ASP.NET 2.0 and Session StorageASP.NET 2.0 allows you to store session variables at three distinct locations:In the memory of the Web server (in process) In the memory of a machine dedicated to storing session variables (state server) In an SQL Server database The first mode is the default. Modes 2 and 3 are often called out-of-process modes because the session store is independent of the Web site. In this article, you will restrict yourself to exploring the third mode.Storing session variables in the SQL server has the following advantages:Scalability: If you are looking for a highly scalable option to store your session variables, the SQL Server option is for you. It is a much more scalable option than the others. Web farm architecture can very easily access the session variables because they are stores in an independent database. Reliability: Because the data is physically persisted in a database, it is is more reliable than the other options. It has the ability to survive server restarts. Security: SQL Server is more secure than the in-memory or state server option. You can protect your data more easily by configuring SQL Server security. The session state mode can be configured via a tag of the web.config file.Notes:In Web farm scenarios, the application path of the Web site in the IIS metabase should be identical in all the Web servers in the Web farm. Session_End event never fires for any of the out-of-process modes. Configuring SQL Server to Store a Session StateBefore you can actually store a session state in SQL server, you need to configure it. This configuration is done via a command line tool called ASPNET_REGSQL.EXE. You can store the session state in three possible locations within the SQL Server:Temporary storage: In this case, the session state is stored in the tempdb database of SQL Server. The tool creates a database called ASPState and adds certain stored procedures for managing session to it. The tool also creates required tables in the tempdb database. If you restart the SQL server, the session data is not persisted. Persistent storage: The tool creates a database called ASPState and adds stored procedures for managing a session to it. The session state is stored in the ASPState database. The advantage of this method is that the data is persisted even if you restart the SQL server. Custom storage: Both the session state data and the stored procedures are stored in a custom database. The database name must be specified in the configuration file. The following table lists various command line switches of the tool with respect to session store configuration:Command line switchDescription-S Species the IP address or the name of SQL server in which you want to store the session state-USpecifies the user ID to be used when connecting to the SQL Server-PSpecifies the password to be used when connecting to the SQL Server-EIndicates that you want to use integrated security when connecting to the SQL Server-ssaddAdds support for the SQLServer mode session state-ssremoveRemoves support for the SQLServer mode session state-sstypeType of session state support. This option can be: t for temporary storagep for persistent storagec for custom storage-d The name of the custom database to use if -sstype switch is cTables and Stored Procedures CreatedAs a developer, you possibly will never interact with the session state database directly. However, it would be nice to have a general understanding of the tables and stored procedures created when you run the ASPNET_REGSQL.EXE tool. Figure 1 shows the tables created by this tool; Figure 2 shows the list of stored procedures.Figure 1: Tables created in the SQL Server databaseFigure 2: Stored procedures created in the SQL Server databaseConfiguring the Web Site to Store a Session StateOnce you configure your SQL server to support session state storage, the next step is to configure your Web site. The tag of web.config allows you to specify information about the session store. The following table lists some of the important attributes of this tag: AttributeDescriptionmodeThe mode attribute can take the following values: Off: Indicates that the session state is turned off.InProc: Indicates that the session state will be stored in the Web servers memory. This is the default setting.StateServer: Indicates that the session state will be stored on a state server.SQLServer: Indicates that the session state will be stored in a SQL Server database.Custom: Indicates that you will have a custom mechanism of session storage using a provider model of ASP.NETsqlConnectionStringIf the mode is set to SQLServer, you must specify this attribute. This attribute specifies the database connection string of the SQL Server database that is acting as a state store. Note that you need not specify the database name in the connection string if you are using temporary or persistent storage options (see above).allowCustomSqlDatabaseIf you want to store session state in a SQL server database of your own, you must set this attribute to true. Once this attribute is set to true, be sure to specify the name of the database the in sqlConnectionString attribute described above.ExampleTo illustrate what youve learned up to now, you can develop a simple Web site and configure it to store a session state in a SQL Server database.Configuring SQL ServerOpen the Visual Studio.NET 2005 command prompt and issue the following command:aspnet_regsql -ssadd -S .sqlexpress -E -sstype pHere, you are using SQL Express as the database with integrated security turned on. Figure 3 shows a sample run of this tool with the session state type set to persistent.Figure 3: Sample run of ASPNET_REGSQL.EXE toolCreating and configuring a Web siteNow, create a new web site and modify the web.config file to have the following markup:Here, you added the tag and set its mode attribute to SQLServer. You also specified the sqlConnectionString attribute and pointed it to your SQL Server.Creating test web formsAdd two Web forms in the Web site called Page1.aspx and Page2.aspx. The first Web form will display a list of products to choose from. The selected products are stored in a DataSet. The DataSet is then persisted across the requests by storing it in a session variable. The second Web form simply displays the selected products from the DataSet.To create the first Web form, follow these steps:Drag and drop a GridView control and SQL Data Source control onto the Web form. Configure the SQL Data Source control to select the ProductID, ProductName, and UnitPrice columns from the Products table of the Northwind database. (A detailed explanation of using data source controls is out of scope of this article.) Bind the GridView to the SQL Data Source by setting its DataSourceID property to the ID property of the SQL Data Source control From the smart tags of GridView, check the Allow Selection checkbox. Add a HyperLink control and set its NavigateUrl property to Page2.aspx. The following markup is generated as a result of above operations (unwanted markup removed):. .Show my cart.asp:SqlDataSource ID=SqlDataSource1 runat=server ConnectionString= SelectCommand=SELECT ProductName, UnitPrice FROM Products ORDER BY ProductNameNow, add the following code to the SelectedIndexChanged event of the GridView:protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) DataSet ds=null; if (Sessionmyds = null) ds = new DataSet(); DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn(ProductName); dt.Columns.Add(new DataColumn(Qty, typeof(System.Int32); ds.Tables.Add(dt); Sessionmyds = ds; else ds = (DataSet)Sessionmyds; DataRow row=ds.Tables0.NewRow(); rowproductname=GridView1.RowsGridView1.SelectedIndex. Cells0.Text; rowQty=1; ds.Tables0.Rows.Add(row);Here, you create a DataSet and a DataTable. The DataTable contains two DataColumns: ProducyName and Qty. You then store the DataSet in a session variable called myds. When the user selects a product, you create a new DataRow, assign the product details to it, and then add this row to the DataTable. Thus, the user selections are persisted across multiple requests.To create the second Web form, follow these steps:Drag and drop a GridView onto the Web form. Add two bound fields. Set the HeaderText property of the first bound field to Product Name. Also, set its DataField property to ProductName. Set the HeaderText property of the second bound field to Quantity. Also, set its DataField property to Qty. The following markup is created as a result of above operations (unwanted markup removed):. .Add the following code in the Page_Load event handler of the se
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
提示  人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:ASP+SQL图书管理系统
链接地址:https://www.renrendoc.com/p-58899305.html

官方联系方式

2:不支持迅雷下载,请使用浏览器下载   
3:不支持QQ浏览器下载,请用其他浏览器   
4:下载后的文档和图纸-无水印   
5:文档经过压缩,下载后原文更清晰   
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

网站客服QQ:2881952447     

copyright@ 2020-2025  renrendoc.com 人人文库版权所有   联系电话:400-852-1180

备案号:蜀ICP备2022000484号-2       经营许可证: 川B2-20220663       公网安备川公网安备: 51019002004831号

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知人人文库网,我们立即给予删除!