易截截图软件、单文件、免安装、纯绿色、仅160KB

c#启动Sql Server服务

程序启动Sql Server其实很简单
代码:
System.ServiceProcess.ServiceController   myController   =
new   System.ServiceProcess.ServiceController("MSSQL$ACCP4444"); //服务名称 找了半天才找到,笨死我完了。在服务上右键属性,能看到
if (myController.CanStop)
{ }
else
{
   myController.Start();
}
//注 需要引用 System.ServiceProcess 在项目->添加引用->能找到这个引用。


相关文档:

c# 读写XML文件

   用c#给PDA做了一个PC端的通讯程序,需要保存两个参数。用Delphi时,是保存在ini文件中,c#读写XML比较方便,就用xml文件来保存了。
   
 
class CXmlClass
{
private string XmlFilePath;
/// <summary>
/// 下载到PDA的TXT文件路径 
/// </summary>
......

在存储过程中连接SQL语句字符串

CREATE PROCEDURE [dbo].[PUB_CORP_SEARCH]
    @oi_return            INT                OUTPUT    ,   ......

C#操作各种执行sql的方法含存储过程操作

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
namespace MyDbTest
{
class Program
{
static void Main(string[] args)
{
SqlConnection thisConnection = new SqlConnection(
@ ......

【SQL SERVER2005页面存储3之 聚集索引的存储】


                                                 &nbs ......

SQL行转列 列转行


--行列互转
/****************************************************************************************************************************************************** 
以学生成绩为例子,比较形象易懂 整理人:中国风
(Roy) 
日期
:2008.06.06 *************************************** ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号