摘要:
SqlConnection con = new SqlConnection(); string s = System.Environment.CurrentDirectory; //exe 所在路径 int i = 0; while (i < 0) { i++; int add = s.LastIndexOf(@"\"); s = s.Substring(0, add); ... 阅读全文
摘要:
C#获取当前路径的方法如下: 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName -获取模块的完整路径。 2. System.Environment.CurrentDirectory -获取和设置当前目录(该进程从中启动的目录)的完全限定目录。 3. System.IO.Directory.GetCurrentDirectory() -获取应用程序的当前工作目录。这个不一定是程序从中启动的目录啊,有可能程序放在C:\www里,这个函数有可能返回C:\Documents and Settings\ZYB\,或 阅读全文
摘要:
<configuration><system.web><httpRuntime><httpRuntime useFullyQualifiedRedirectUrl="true|false"maxRequestLength="size in kbytes"executionTimeout="seconds"minFreeThreads="number of threads"minFreeLocalRequestFreeThreads="number of threa 阅读全文
摘要:
T-SQL是标准 SQL 程式设计语言的增强版,它是用来让应用程式与 SQL Server 沟通的主要语言。T-SQL 提供标准 SQL的DDL 和 DML 功能,加上延伸的函数、系统预存程序以及程式设计结构(例如 IF 和 WHILE)让程式设计更有弹性。 阅读全文
摘要:
// 主程序using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using System.IO;namespace WFcopyFile{ static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Applic... 阅读全文
摘要:
SQL DROP TABLE 语句DROP TABLE 语句用于删除表(表的结构、属性以及索引也会被删除):DROP TABLE 表名称SQL DROP DATABASE 语句DROP DATABASE 语句用于删除数据库:DROP DATABASE 数据库名称SQL TRUNCATE TABLE 语句如果我们仅仅需要除去表内的数据,但并不删除表本身,那么我们该如何做呢?请使用 TRUNCATE TABLE 命令(仅仅删除表格中的数据):TRUNCATE TABLE 表名称 阅读全文
摘要:
SQL Server:Select TOP N * From TABLE Order By NewID()view plaincopy to clipboardprint?Select TOP N * From TABLE Order By NewID()Select TOP N * From TABLE Order By NewID()NewID()函数将创建一个 uniqueidentifier 类型的唯一值。上面的语句实现效果是从Table中随机读取N条记录。Access:Select TOP N * From TABLE Order By Rnd(ID)view plaincopy t 阅读全文