December 2009
M T W T F S S
« Nov   Mar »
 123456
78910111213
14151617181920
21222324252627
28293031  

Send SqlDbType.Xml to Store Procedure

SqlCommand command = new SqlCommand(”ReportMultiTruckGeneric”);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(”@startDate”, SqlDbType.DateTime).Value = ProcessStartDate;
command.Parameters.Add(”@endDate”, SqlDbType.DateTime).Value = ProcessEndDate;

StringBuilder sb = new StringBuilder();

sb.Append(”<Trucks>”);
foreach (DataRow row in trucks.Tables[0].Rows)
{
sb.AppendFormat(”<TruckId>{0}</TruckId>”, row["ID"].ToString());
}
sb.Append(”</Trucks>”);

command.Parameters.Add(”@trucks”, SqlDbType.Xml).Value = sb.ToString();

DataSet queryResult = DBHook.SendSQLSelectRequest(command, out ex);

==store procedure=============
ALTER procedure [dbo].[ReportMultiTruckGeneric]
@startDate datetime,
@endDate datetime,
@trucks xml
as


set @trucksCopy = @trucks

select Trucks.TruckId.value(’.’, ‘int’)
from @trucksCopy.nodes(’Trucks/TruckId’) as Trucks(TruckId)

What is Google Public DNS?

http://code.google.com/intl/th-TH/speed/public-dns/

ไปตั้งค่า DNS เป็น 8.8.8.8 กับ 8.8.4.4 นะครับ ผลคือเน็ตผมเร็วขึ้นกว่าเดิมมากๆเลย

Multi Thread and Delegate

จากรูปข้างล่างนี้เราสามารถที่จะเลือกใส่ทั้ง IP Address , HostName, DNS เพื่อทำการ Ping ได้ครับ

http://greatfriends.biz/webboards/msg.asp?b=SURREALIST&id=21512

http://greatfriends.biz/webboards/msg.asp?b=SURREALIST&id=21512

http://greatfriends.biz/webboards/msg.asp?id=16216

New line in crystal report formular

chr(13)