-
一个字符串的加密和解密的例子c#
摘要:最近要用到字符串的加密和解密,在网上得到一些代码,做了修改,让其可以加密和解密汉字(使用Unicode编码)加密和解密的类如下:using System;using System.Collections.Generic;using System.Text; namespace Gedee.Common.BLL{ enum TDesMode { dmEncry, dmDecry }; c...
阅读全文
-
使用sp_executesql执行sql并返回参数
摘要:日前遇到一个存储过程不能执行带参数的sql语句的问题,如: select @Countint=count(id) from [@tablename] where @strwhere总提示where 附近有错误. 后来把该句作成字符串执行: Set @sqlstr='select @Countint=count(id) from [' +@tablename + '] wh...
阅读全文
-
两个数据分页的存储过程
摘要:1. 按某个特定表查询的存储过程:CREATE PROCEDURE GetPagingData_bigfun@tblName varchar(255), -- 表名@strGetFields varchar(1000) = '*', -- 需要返回的列 @fldName varchar(255)='', -- 排序的字段名@PageSize int = 10, -- 页尺寸@PageIndex i...
阅读全文
|