03 2014 档案
摘要:原理就类似于把一个表的资 料放在不同的分区里面,当查询时,如果都在同一个单独的分区内的话,就不用进行全表扫描,因此在这些情况下可以提高查询的效率,但如果所有分区都要查询所 有资料的话,分区并不会提高效率.--创建分区表过程一共分为三步:创建分区函数、创建分区方案、创建分区表USE [CardID]GOBEGIN TRANSACTION----创建分区函数CREATE PARTITION FUNCTION [SlotecardFunction](datetime) AS RANGE left FOR VALUES (N'2014-03-26T00:00:00', N'20
阅读全文
摘要:首先创建一个数据库连接类:SQLHelperusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;namespace insetData{ public class SQLHelper { public static readonly string Strconn = "Data Source=LocalHost;database=CardID;uid=sa;pwd=12...
阅读全文
摘要:insert into Tb_People(uname,era,amount) values( '兆周','老年','10000') select @@identity --当运行完插入语句后,执行select @@identity就可得到自动生成的id --如果是sql server 最好用select SCOPE_IDENTITY() as id--因为@@identity全局的select SCOPE_IDENTITY() as id select IDENT_CURRENT ('Tb_People')select MAX(
阅读全文
摘要:生成sql代码 生成静态:select *from (select sname,[Course ] ='数学',[Score]=[数学] from Tb_students union allselect sname,[Course]='英语',[Score]=[英语] from Tb_students union allselect sname,[Course]='语文',[Score]=[语文] from Tb_students)torder by sname,case [Course] when '语文' then 1 whe
阅读全文
摘要:一张表查询结果为--行转列select years,(select amount from Tb_Amount as A where month=1 and A.years=Tb_Amount.years)as m1,(select amount from Tb_Amount as A where month=2 and A.years=Tb_Amount.years)as m2,(select amount from Tb_Amount as A where month=3 and A.years=Tb_Amount.years)as m3from Tb_Amount group by ..
阅读全文
摘要:1在c#语言中 如何将int 类型转化为byte 类型 Convert.ToByte 方法 (Int32) BitConverter.GetBytes 方法 (Int32)2.SQL中varchar和nvarchar区别1、各自的定义: nvarchar(n) : 包含 n 个字符的可变长度 Unicode 字符数据。n 的值必须介于 1 与 4,000 之间。字节的存储大小是所输入字符个数的两倍。所输入的数据字符长度可以为零。 varchar[(n)]: 长度为 n 个字节的可变长度且非 Unicode 的字符数据。n 必须是一个介于 1 和8,000 之间的数值。存储大小为输入数据的字节的
阅读全文
摘要:""; 只是返回历史页面而不刷新 window.close();关闭窗口,不弹出系统提示,直接关闭""; 返回指定页面 并即时刷新页面信息
阅读全文
摘要:利用jQueryEasyUi框架实现服务端数据显示以及利用http协议方式请求处理数据1.一般处理文件:Handler1.ashx主要处理来自客户端请求数据并返回相关信息using System;using System.Collections.Generic;using System.Linq;using System.Web;using DBUtility;using System.Data;using System.Text;using CardServerBLL;using CardServerModel;using System.Web.Script.Serialization;us
阅读全文
摘要:客户端界面效果图:2.客户端功能实现一:窗体代码namespace WriteCard{ partial class FrmCard { /// /// 必需的设计器变量。 /// private System.ComponentModel.IContainer components = null; /// /// 清理所有正在使用的资源。 /// /// 如果应释放托管资源,为 true;否则为 false。 protected override ...
阅读全文
摘要:1.简单需求分析以及概要设计模拟刷卡信息实现客户端刷卡并上传到服务端,服务端记录和统计显示信息。一:用户资料信息用户基本信息表:客户ID、卡号、姓名、性别、职称、身份证号、刷卡时间、所属学校等信息刷卡记录表:ID、卡号、刷卡时间二:刷卡信息1.当用户通过卡在终端机上刷卡,产生刷卡记录并记录用户资料信息到数据库中,同时统计刷卡信息资料并统计刷卡的次数,根据刷卡时间段记录刷卡次数。2.根据卡号查找用户基本信息表 客户的卡号 姓名 以及刷卡系统时间当刷卡的时候就提取用户信息 插入一笔刷卡记录Post到服务端,数据信息显示到页面2.数据库表结构设计 人员基本信息表序号CustermIDIntpr...
阅读全文