2004年12月21日

OICQ 发送 ZT

摘要: <% @ Page Langua ge="C#" %> <% @ Assembly Name="System.Net" %> <% @ Import Namespace="System.Net" %> <% @ Import Namespace="System.Net.Sockets" %> <% @ Import Namespace="System.IO" %> <% @ Import Namespace="Syste 阅读全文

posted @ 2004-12-21 16:40 老代哥哥 阅读(136) 评论(0) 推荐(0) 编辑

2004年12月17日

ERROR处理

摘要: protected void Application_Error(Object sender, EventArgs e){//Session["CurrentError"] = "Global: " + Server.GetLastError().Message;//Server.Transfer("ErrorPage.aspx",true);} <authentication mode="Forms"> <forms name="401kApp" loginUrl=" 阅读全文

posted @ 2004-12-17 11:12 老代哥哥 阅读(99) 评论(0) 推荐(0) 编辑

2004年12月14日

异步文件 I/O

摘要: 异步文件 I/O同步 I/O 意味着在 I/O 操作完成之前,方法被阻塞,I/O 操作完成后,方法返回其数据。使用异步 I/O,用户可以调用 BeginRead 或 BeginWrite。主线程可以继续进行其他工作,稍后,用户将能够处理数据。另外,多个 I/O 请求可以被同时挂起。要在此数据可用时得到通知,您可以调用 EndRead 或 EndWrite,传入与您发出的 I/O 请求对应的 IAsyncResult。您还可以提供回调方法,该回调方法应调用 EndRead 或 EndWrite 以计算出读取或写入了多少字节。当许多 I/O 请求被同时挂起时,异步 I/O 可以提供较好的性能,但通 阅读全文

posted @ 2004-12-14 19:30 老代哥哥 阅读(223) 评论(0) 推荐(0) 编辑

C# 操作DTS

摘要: in the C# class file for your project: using System;using System.Runtime.InteropServices;using DTS;namespace DtsInterop{ //This class loads and executes the DTS package. class ExecPkgWithEvents { /* Prior to running this code, create a DTS package and save it to SQL Server. Then set a reference to . 阅读全文

posted @ 2004-12-14 09:06 老代哥哥 阅读(282) 评论(0) 推荐(0) 编辑

2004年12月13日

DTS 用法学习 ZT

摘要: //加入名称空间using System.Data;using System.Data.SqlClient;//定义方法GetData(),返回一个数据表private System.Data.DataTable GetData(){SqlConnection conn= new SqlConnection(@"Server=PXGD2;Initial Catalog=pingxiang;Uid=sa;Pwd=;");SqlDataAdapter adapter= new SqlDataAdapter("select username 用户名,catalyst_p 阅读全文

posted @ 2004-12-13 20:13 老代哥哥 阅读(524) 评论(0) 推荐(0) 编辑

EXCEL数据导入SQL

摘要: name varchar(8), sex varchar(2), code varchar(30), czlb varchar(2), cblb varchar(2), cjgzrq datetime, csrq datetime, dwdm varchar(2), rydl varchar(2), rylb varchar(2), ryzl varchar(2), sngzze float, snjzje float, snjzlx float 阅读全文

posted @ 2004-12-13 19:39 老代哥哥 阅读(154) 评论(0) 推荐(0) 编辑

2004年12月10日

身份证验证 ZT

摘要: alter function dbo.IDTrue--验证十八位身份证是否正确( @ID varchar(18))returns bitas begin--验证格式是否正确declare @RES bitdeclare @W table (rn int,val int)insert into @W(rn,val)select 1,7union select 2,9union select 3,10union select 4,5union select 5,8union select 6,4union select 7,2union select 8,1union select 9,6unio 阅读全文

posted @ 2004-12-10 16:31 老代哥哥 阅读(266) 评论(0) 推荐(0) 编辑

C#之消息队列的简要说明----自学笔记

摘要: using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Messaging ;using System.Threading ;namespace WinMsmq{/// <summary>/// Form1 的摘要说明。/// </summary>public class Form1 : System.Windows.Forms.Form{ 阅读全文

posted @ 2004-12-10 15:00 老代哥哥 阅读(235) 评论(0) 推荐(0) 编辑

ZT :MD5算法之T_SQL实现

摘要: /***************************************************************************** * Name: T-SQL MD5算法实现 * Author: Rambo Qian * Create Date: 2003-04-10 * Last Modified by: Rambo Qian * Last Update Date: 2003-04-16 * Version: V1.0.00 *********************************************************************** 阅读全文

posted @ 2004-12-10 14:57 老代哥哥 阅读(160) 评论(0) 推荐(0) 编辑

2004年12月7日

为数据库的表自动生成行号----为分页打好基础(仿Oracle的ROWNUM)

摘要: 在以数据库为基础的应用程序开发中,分页是一个比较常用的操作,可惜的是SQL Server2000中没有Oracle中相应的ROWNUM属性可用,小弟用”触发器“生成一个ROWNUM列]勉强可以一用,当然用如下的SQL语句也可以生成第i页,每页n行,tid是主键列,select top n * from tab wherestrWhere and tid>(select max(tid) from (select top (i-1)*n tid from tab where strWhere order by tid ) as T) )order by tid也可以,但是我想用另一种方法也 阅读全文

posted @ 2004-12-07 16:48 老代哥哥 阅读(210) 评论(0) 推荐(0) 编辑

导航