先创建一张测试的数据表
create table users(
username varchar(40) not null,
password varchar(40) not null)charset=utf8;
插入数据
insertinto users values("admin","admin");
insertinto users values("理央silence","王...
分类:
数据库 时间:
2015-05-04 22:09:23
阅读次数:
168
延迟加载类 1 public class LazyLoader where TModel:class 2 { 3 TModel _data; 4 Func _loadDataFunc = null; 5 bool _loaded = f...
分类:
其他好文 时间:
2015-05-04 21:58:46
阅读次数:
200
摘自:http://www.cnblogs.com/ccweb/p/3403492.html using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = new SqlConnection(@"...
分类:
数据库 时间:
2015-05-04 19:56:18
阅读次数:
150
四、SQL PRIMARY KEY 约束 PRIMARY KEY 约束唯一标识数据库表中的每条记录 主键必须包含唯一的值 主键列不能包含 NULL 值 每个表都应该有一个主键,并且每个表只能有一个主键下面的SQL 在 Persons 表创建时在 Id_P列创建PRIMARY KEY 约束 ...
分类:
数据库 时间:
2015-05-04 19:43:54
阅读次数:
213
(1)windows写日志系统 1 void writeDebugEventLog(TCHAR* pszMessage, WORD wType) 2 { 3 //#ifdef _DEBUG 4 5 HANDLE hEventSource = NULL; 6 const TC...
public final static String filterSQLInjection(String s) { ??? if (s == null || "".equals(s)) { ??????? return ""; ??? } ??? try { ??????? s = s.trim().replaceAll("</?[s,S][c,...
分类:
数据库 时间:
2015-05-04 18:26:03
阅读次数:
151
今天遇到一个问题,代码是这样的。 ????????public?List<BillName>?QueryBill(int[]?id?=?null,?string[]?name?=?null)
????????{
????????????List<BillName>?queryRe...
分类:
其他好文 时间:
2015-05-04 18:23:25
阅读次数:
146
1、代码
<%
String data = request.getParameter("data");
if (data != null) {
int width = 128;
int height = 128;
String format = "png";
Hashtable hints = n...
分类:
其他好文 时间:
2015-05-04 18:12:18
阅读次数:
155
一、SQL约束 约束用于限制加入标的数据的类型 可以在创建表的时候规定约束(通过 CREATE TABLE 语句),或者在表创建之后也可以(通过 ALTER TABLE语句) 主要探讨以下的几种约束:1) NOT NULL2) UNIQUE3) PRIMARY KEY4) FOREIGN KE...
分类:
数据库 时间:
2015-05-04 17:30:31
阅读次数:
401
今天遇到一个问题,代码是这样的。 ` public List QueryBill(int[] id = null, string[] name = null) { List queryResult = new List(); using (var dbs = new Dal.CashLogContext()) { var result = from a in ...
分类:
其他好文 时间:
2015-05-04 16:00:27
阅读次数:
127