ASP.NET连接SQL和ACCESS的方法
SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath 为根目录
相关文档:
alter procedure qry_page
@sqlstr nvarchar(4000), --查询字符串
@page int, --第N页
@pagesize int &n ......
Orcale 的SQL 语句取得系统当前时间用:sysdate
当需要在系统当前日期上减去一天时可以用 sysdate-1
附:当只对一定数量的记录感兴趣时可以如 rownum<100
select * from SLYC_CUSTINFO_T where indbtime>sysdate-1 and OFFICE_CODE='46' and rownum<1 ......
ORACLE常用SQL优化hint语句
http://oracle.chinaitlab.com/induction/802186.html
在SQL语句优化过程中,我们经常会用到hint,现总结一下在SQL优化过程中常见Oracle HINT的用法:
1. /*+ALL_ROWS*/
表明对语句块选择基于开销的优化方法,并获得最佳吞吐量,使资源消耗最小化.
例如:
SELECT /*+ALL+_ROW ......
[php]
<?php
--------------------------------------------------------------------
//FileName:class.php
//Summary: Access数据库操作类
//Author: forest
//CreateTime: 2006-8-10
//LastModifed:
//copyright (c)2006
//http://freeweb.nyist.net/~chairy
//cha ......
asp.net(C#)字符串加密
2010-03-12 09:59
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
......