Roy Ashbrook

let go or be dragged
posts - 197, comments - 29, trackbacks - 8

December 2007 Entries

five year old swarm!

28

posted @ Friday, December 14, 2007 2:26 PM | Feedback (0) |

.Net DataReader to ArrayList

string sql = "some sql" ArrayList al = new ArrayList(); using (SqlConnection cn = new SqlConnection(cs)) using (SqlCommand cmd = new SqlCommand(sql, cn)) {     cn.Open();     using (SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection))     while (dr.Read()) {         object[] o = new object[dr.FieldCount];         dr.GetValues(o);         al.Add(o);     } } foreach(object[] o in al)     Console.WriteLine(a1(o[0].ToString());

posted @ Thursday, December 13, 2007 3:16 PM | Feedback (0) | Filed Under [ DEV ]

clear buffers in sql

DBCC FREESESSIONCACHE DBCC FREEPROCCACHE DBCC FREESYSTEMCACHE('ALL') CHECKPOINT DBCC DROPCLEANBUFFERS

posted @ Friday, December 7, 2007 4:47 PM | Feedback (0) | Filed Under [ DBA ]

Powered by: