『转』SQL数据库连接语句
来源:互联网 发布:表单大师能做多少数据? 编辑:程序博客网 时间:2024/05/22 12:59
一般的远程访问的写成这样:
Data Source=IP;Initial Catalog=数据库名;UserID=用户名;Password=密码
本地访问的写成这样:
Data Source=(local);Initial Catalog=数据库名;UserID=用户名;Password=密码
如果是本地的,通过windows组件验证的(也就是没有用户名,密码的)写成这样:
Data Source=(local);Initial Catalog=数据库名;Integrated Security=True
如果不是默认的实例,假如实例名是SQLEXPRESS,写成这样:
Data Source=(local)/SQLEXPRESS;Initial Catalog=数据库名;Integrated Security=True
ExecuteReader
简单高效的,单向前的数据查询。返回一个SqlDataReader对象
通常用于读取数据
ExecuteNonQuery
返回一个int类型的值,返回数据库中所影响的行数。
用于对数据库的各种操作
ExecuteScalar
返回读出结果的第一行第一列
WorkflowIdled 事件
.NET Framework 类库
WorkflowRuntime..::.WorkflowIdled 事件
更新:2007 年 11 月
在工作流实例进入空闲状态后发生
static void Main()
{
string connectionString = "Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;";
using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
{
ExternalDataExchangeService dataService = new ExternalDataExchangeService();
workflowRuntime.AddService(dataService);
dataService.AddService(expenseService);
workflowRuntime.AddService(new SqlWorkflowPersistenceService(connectionString));
workflowRuntime.StartRuntime();
workflowRuntime.WorkflowCompleted += OnWorkflowCompleted;
workflowRuntime.WorkflowTerminated += OnWorkflowTerminated;
workflowRuntime.WorkflowIdled += OnWorkflowIdled;
workflowRuntime.WorkflowAborted += OnWorkflowAborted;
Type type = typeof(SampleWorkflow1);
WorkflowInstance workflowInstance = workflowRuntime.CreateWorkflow(type);
workflowInstance.Start();
waitHandle.WaitOne();
workflowRuntime.StopRuntime();
}
}
- 『转』SQL数据库连接语句
- SQL数据库连接语句
- SQL数据库连接语句
- SQL数据库连接语句
- Oracle数据库连接查询SQL语句
- 创建数据库连接执行SQL语句
- [MyBatis]获取数据库连接、批量执行SQL语句
- C#数据库连接字符串及SQL语句处理
- [MyBatis]获取数据库连接、批量执行SQL语句
- Java数据库连接 - 预编译SQL语句
- java数据库连接(SQL Server2008)调用sql语句
- 数据库连接语句
- 数据库连接语句
- 数据库连接语句
- C#和SQL Server2000数据库连接,查询语句总结
- ASP创建并打开SQL数据库连接语句段
- sql如何写数据库连接语句,默认方式链接数据库
- 数据库连接+SQL语句+存储过程+ADO.Net调用存储过程
- 图像处理小结
- jsp+mysql+hibernate+spring中文乱码问题
- release 时去掉nslog的方法
- 管理和备份控制文件
- 常用小问题
- 『转』SQL数据库连接语句
- 对CURL的一些研究
- ajax
- 领取失业保险金人员参加职工医保个人不缴费
- 飞机游戏策划
- SSH KEY Linux下无法连接问题
- 关于技术学习的一点感想
- 11/7/5 deque 学习笔记
- 理解RTP timestamp