SQL数据库连接语句
一般的远程访问的写成这样:
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;
&
相关文档:
You can user PL SQL Developer in Ubuntu like in Windows:
1.download PL/SQL Developer for linux;
2.Install JDK berfore the next;
3.install the PL/SQL Developer;
4.goto the $PL/SQL Developer,run sh sqldeverloper.sh;
5.type the $JDK;
6.then the PL/SQL Developer will startup. ......
根据生日的xx月xx日查找在$checkDate计算,$before日后生日的客户:
$checkDate为YYYY-MM-DD
WHERE substring(ADDDATE( '$checkDate', $before ),6,10)=substring(DATE_FORMAT(birthday,'%Y-%m-%d'),6,10)
$dates 天内生日的客户未考虑到平年、闰年::
$sql.=" (dayofyear( birthday )-dayofyear( ......
下列语句部分是Mssql语句,不可以在access中使用。
SQL分类:
DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE)
DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT)
DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)
首先,简要介绍基础语句:
1、说明:创建数据库
......
右击要清除日志的数据库 选择属性
在数据库属性中 选择选项 在右边恢复模式下拉列表框中 选择简单 单击确定 返回
右击要清除日志的数据库 选择任务-收缩-数据库 单击确定
完成收缩 日志文件大小变为0 ......