| « | December 2025 | » | | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | |
|
| 公告 |
Back Today!
Hold on~
Come on~ |
| 统计 |
blog名称:执著 日志总数:39 评论数量:43 留言数量:0 访问次数:247527 建立时间:2005年3月4日 | |
[小技巧]自动刷新页面的实现方法(Javascript) |
执著 发表于 2006/8/11 14:08:48 |
1) <meta http-equiv="refresh"content="10"> 10表示间隔10秒刷新一次 2) <script language=''javascript''> window.location.reload(true); </script> 如果是你要刷新某一个iframe就把window给换成frame的名字或ID号 3) <script language=''javascript''> window.navigate("本页面url"); </script>
| |
|
|
[.net]操作excel的类 |
执著 发表于 2005/8/24 11:44:19 |
using System; using System.Data; using System.Data.OleDb; using Excel; using System.Collections.Specialized;
namespace winapp_test { /// <summary> /// class_excel 的摘要说明。 /// </summary> public class class_excel { private string _filename; Excel.ApplicationClass app = new ApplicationClass(); Excel.Workbook excel_wb; public class_excel(string f) &nb | |
|
|
[SQLSERVER]C#中调用SQLSERVER DTS包的简单用法 |
DTS.Package2Class p = new DTS.Package2Class(); object t= null; p.LoadFromSQLServer(".","user","password",DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default,null,null,null,"pack1",ref t);
p.Execute(); p.UnInitialize(); p = null;
| |
|
|
[.net]按正则式查找文本文件中所有符合的字符 |
open1.Filter="文本文件(*.txt)|*.txt|所有文件|*.*"; open1.ShowDialog(); if (open1.FileNames.Length > 0) { save1.Filter ="文本文件(*.txt)|*.txt|所有文件|*.*"; save1.CreatePrompt = true; save1.ShowDialog(); if (save1.FileName != "") { System.IO.StreamWriter w | |
|
|
[SQLSERVER]浅析SQL SERVER一个没有公开的存储过程  |
执著 发表于 2005/6/15 23:58:00 |
从SQLSERVER6.5开始,MS提供了一个非常有用的系统存储过程sp_MSforeachtable和sp_MSforeachDB;作为DBA会经常需要检查所有的数据库或用户表,比如:检查所有数据库的容量;看看指定数据库所有用户表的容量,所有表的记录数,我们一般处理这样的问题都是用游标分别处理处理,比如:在数据库检索效率非常慢时,我们想检查数据库所有的用户表,我们就必须这样写游标:
DECLARE @TableName varchar(255) DECLARE @ExeSQL varchar(4000) DECLARE Table_Cursor CURSOR FOR SELECT [name] FROM sysobjects WHERE xtype='U' OPEN Table_Cursor FETCH NEXT FROM Table_Cursor INTO @TableName WHILE(@@FETCH_STATUS=0) BEGIN PRINT @TableName SELECT @E | |
|
|
[SQLSERVER]sqlxml中的EXPLICIT模式 |
执著 发表于 2005/6/15 23:42:28 |
|
use pubs
select 1 as tag,null as parent,stor_id as [aa!1!d],ord_num as [aa!1] from sales for xml explicit
简单举例,
具体看sql帮助explicit模式 | |
|
|
[.net]kill进程 |
执著 发表于 2005/4/12 11:45:53 |
using System.Diagnostics;
....
try { foreach (Process thisproc in Process.GetProcessesByName("Excel")) { if(!thisproc.CloseMainWindow()) { thisproc.Kill(); } } } catch(Exception Ex | |
|
|
[.net]excel中的工作表名sheetname |
执著 发表于 2005/4/11 23:49:25 |
Excel.ApplicationClass exa = new Excel.ApplicationClass(); Excel.Workbooks wbs = exa.Workbooks; Excel.Workbook wb = wbs.Open(@"E:\1\aa.xls",Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
for (int i = 1; i<=wb.Worksheets.Count;i++) { Message | |
|
|
[.net]ini文件操作 |
执著 发表于 2005/4/11 13:17:13 |
using System; using System.IO; using System.Runtime.InteropServices; using System.Text;
public class inifile { public string Path; [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section,string key,string val,string filePath); [DllImport("kernel32")] private static extern int GetPrivateProfileString(string section,string key,string def,StringBuilder re | |
|
|
[.net]遍历目录下的所有文件 |
private void button1_Click(object sender, System.EventArgs e) { folderBrowserDialog1.ShowDialog(); if (folderBrowserDialog1.SelectedPath !="") { StringCollection sc =getallfiles(folderBrowserDialog1.SelectedPath);
for(int i = 0;i<sc.Count;i++) { MessageBox.Show(sc[i]);//得到所有的文件名
&nbs | |
|
|
|
|
|