今日インフルエンザ予防接種を受けたから。
次ビリーが出来るのはさ来週ぐらいかな?
2007年11月20日火曜日
2007年11月18日日曜日
なんかやる気が起こらない
昨日は仕事、Tさんと二人で終電まで。
きょうは体がだるい。起きてはいるがベッドから出る気が起こらない。
会社で募集していた献血は全血献血禁止期間で参加できないので、個人的に成分献血をしようと思っていたのですが、今日は止めよう。
きょうは体がだるい。起きてはいるがベッドから出る気が起こらない。
会社で募集していた献血は全血献血禁止期間で参加できないので、個人的に成分献血をしようと思っていたのですが、今日は止めよう。
2007年11月16日金曜日
ADO.NET2.0のパラメータクエリ
一応%もパラメータクエリに渡せるみたいだ。
こんな感じ
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string strConn, strSQL;
strConn = @"Data Source=.\SQLExpress;" +
"Initial Catalog=Northwind;Trusted_Connection=YES;";
strSQL = "select * from customers where companyname like @a";
SqlConnection cn = new SqlConnection(strConn);
cn.Open();
using (SqlTransaction txn = cn.BeginTransaction())
{
SqlCommand cmd = new SqlCommand(strSQL, cn, txn);
cmd.Parameters.AddWithValue("@a", "FA%");
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
Console.WriteLine("{0}", rdr.GetString(0));
rdr.Close();
txn.Rollback();
}
cn.Close();
int b;
}
}
}
こんな感じ
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string strConn, strSQL;
strConn = @"Data Source=.\SQLExpress;" +
"Initial Catalog=Northwind;Trusted_Connection=YES;";
strSQL = "select * from customers where companyname like @a";
SqlConnection cn = new SqlConnection(strConn);
cn.Open();
using (SqlTransaction txn = cn.BeginTransaction())
{
SqlCommand cmd = new SqlCommand(strSQL, cn, txn);
cmd.Parameters.AddWithValue("@a", "FA%");
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
Console.WriteLine("{0}", rdr.GetString(0));
rdr.Close();
txn.Rollback();
}
cn.Close();
int b;
}
}
}
2007年11月14日水曜日
2007年11月11日日曜日
登録:
投稿 (Atom)