2008年5月21日

C#去除指定字符串中的HTML标签相关代码函数

摘要: //去除指定字符串中的HTML标签相关代码函数 private static string RemoveHtml(string strContent, string strTagName, int strType) { string pattern = ""; string strResult = ""; Regex exp; MatchCollection matchList; switch (strType) { case 1://去掉中标记的内容,保留后面的所有代码 pattern = @"])*>"; exp = new 阅读全文

posted @ 2008-05-21 11:50 风灵溪清 阅读(380) 评论(0) 推荐(0) 编辑

2008年5月14日

C# 应用程序类中定义ACCESS数据库文件地址的方法

摘要: C# 应用程序类中定义ACCESS数据库文件地址的方法方法一:数据库访问类using System;using System.Collections.Generic;using System.Text;using System.Data.OleDb;using System.Data;namespace Link.DataBase{ public class DBManage { System.Data.OleDb.OleDbConnection gConn = null; public OleDbConnection Conn { get { return gConn; } } //定义类公 阅读全文

posted @ 2008-05-14 12:10 风灵溪清 阅读(164) 评论(0) 推荐(0) 编辑

2008年4月25日

SQL十进制转二进制和十六的两个函数

摘要: 十进制转二进制和十六的两个函数A.调用测试:Update MySheet1 set 二进制= dbo.inttobit(十进制)Update MySheet2 set 十六进制= dbo.inttohex(十进制)B.函数内容--十进制转二进制函数CREATE FUNCTION dbo.inttobit (@number int)returns varchar(100)asBEGINDECLARE @i intDECLARE @j floatDECLARE @m intDECLARE @OUT1 varCHAR(1)DECLARE @OUT2 varchar(20)SET @i=@number 阅读全文

posted @ 2008-04-25 12:26 风灵溪清 阅读(189) 评论(0) 推荐(0) 编辑

2008年4月24日

C#远程登陆带验证码的网站

摘要: C#远程登陆带验证码的网站第一步:添加空间引用using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Net;using System.IO;using System.Text;using System.Diagnostics;using System.Web;第二步:按钮运行代码private void button4_Click(object sender, 阅读全文

posted @ 2008-04-24 12:56 风灵溪清 阅读(162) 评论(0) 推荐(0) 编辑

2008年4月15日

SQL事务处理语句总结

摘要: 存储过程中常用到的SQL事务处理语句格式可能会有如下几种:第一种:set xact_abort onbegin traninsert ...update ...delete ... commit tran 第二种:set xact_abort onbegin traninsert ... if @@error0 rollback tranupdate ... if @@error0 rollback trandelete ... if @@error0 rollbacktrancommit tran 第三种:set xact_abort onbegin tr... 阅读全文

posted @ 2008-04-15 11:32 风灵溪清 阅读(435) 评论(1) 推荐(1) 编辑

2008年3月18日

SQL视图的使用

摘要: 第一次建立视图语句CREATE VIEW ViewGameOrderListAS SELECT * FROM GameOrderListUNIONSELECT * FROM GameOrderList1建立方式,在企业管理器的"SQL查询分析器"中执行上述代码使用目的:能获取更新数据合并记录,合并新旧相同字段定义的两个表格.比如历史订单数据表和现今正在用的数据表.一直不看中视图的作用:使用临时表可以存储查询当前合并后的两表数据.如果数据行很多.需要重复的删除了再建立或者是查询是否有重复记录后再添加进历史记录表中.耗费时间.耗费空间.使用缺陷:数据统计查询的时候需要重新读取一 阅读全文

posted @ 2008-03-18 18:01 风灵溪清 阅读(128) 评论(0) 推荐(0) 编辑

2008年3月4日

三级连动JS数据库查询代码整理

摘要: 数据库表设计字段ClassID,ClassName,ClassType,ParentClassIDClassID类别IDClassName类别名称ClassType=1 顶级分类ClassType=2一级分类ClassType=3二级分类ParentClassID父类ClassID,顶类的父类默认为0脚本代码 调用代码大类小类 阅读全文

posted @ 2008-03-04 16:42 风灵溪清 阅读(117) 评论(0) 推荐(0) 编辑

2007年12月24日

C#检测目标机器上是否安装SQL SERVER软件

摘要: //测试退出SQL"服务管理器"后仍然能检测到当前机器上已安装SQL SERVER软件//添加windows服务所需引用空间System.Service.Process.dllusing System.ServiceProcess;//按钮事件:private void button1_Click(object sender, System.EventArgs e){if(ExistSqlServerService()){MessageBox.Show("本电脑已经安装SQL SERVER软件");}else{MessageBox.Show(" 阅读全文

posted @ 2007-12-24 12:18 风灵溪清 阅读(179) 评论(0) 推荐(0) 编辑

2007年12月14日

C#检测目标机器上是否安装Microsoft .NETFramework 1.1平台

摘要: 参考文章http://www.cnblogs.com/hanfeng/archive/2005/03/03/112246.htmlhttp://liuluanqing.blog.ccidnet.com/blog-htm-do-showone-uid-16196-type-blog-itemid-128023.html第一步:引用空间//系统默认空间添加using System;//添加对注册表操作所需引用空间using Microsoft.Win32;第二步:添加函数//检测目标机器上是否安装Microsoft .NETFramework 1.1平台public bool DoesDotNET 阅读全文

posted @ 2007-12-14 16:32 风灵溪清 阅读(206) 评论(0) 推荐(0) 编辑

2007年12月12日

C#获取WIndows版本号截止至Windows2003Server版本

摘要: //引用空间using System;//获取操作系统版本函数public string GetCurrentOSVersion(){//Windows操作系统版本号组成部分:主版本号.次版本号.内部版本号.修订版本号string tempOSVersion="";//从System引用空间中获取当前Windows操作系统的详细描述信息 System.OperatingSystem myOperatingSystem =System.Environment.OSVersion; //从描述信息的版本号判断当前Windows操作系统平台. switch(myOperating 阅读全文

posted @ 2007-12-12 15:04 风灵溪清 阅读(137) 评论(0) 推荐(0) 编辑

导航