c# Programming Glossary: rdr.read
How to execute a stored procedure within C# program http://stackoverflow.com/questions/1260952/how-to-execute-a-stored-procedure-within-c-sharp-program CommandType.StoredProcedure rdr cmd.ExecuteReader while rdr.Read Console.WriteLine Product 0 25 Price 1 6 ####.00 rdr TenMostExpensiveProducts..
Fastest method for SQL Server inserts, updates, selects http://stackoverflow.com/questions/2862428/fastest-method-for-sql-server-inserts-updates-selects cn.Open using var rdr cmd.ExecuteReader while rdr.Read yield return rdr rdr.Close And that lets me write public data.. cn.Open using var rdr cmd.ExecuteReader while rdr.Read yield return factory rdr rdr.Close And now we would call that..
Iterating through all nodes in XML file http://stackoverflow.com/questions/2915294/iterating-through-all-nodes-in-xml-file rdr XmlReader.Create new System.IO.StringReader xml while rdr.Read if rdr.NodeType XmlNodeType.Element Console.WriteLine rdr.LocalName..
Read data from SqlDataReader http://stackoverflow.com/questions/4018114/read-data-from-sqldatareader on asp.net C# SqlDataReader rdr cmd.ExecuteReader while rdr.Read how do I read strings here I know that the reader has values... question using SqlDataReader rdr cmd.ExecuteReader while rdr.Read var myString rdr.GetString 0 The 0 stands for the 0'th column..
What is the difference between null and System.DBNull.Value? http://stackoverflow.com/questions/4958379/what-is-the-difference-between-null-and-system-dbnull-value If yes what is it I noticed this behavior now while rdr.Read if rdr Id null if rdr Id System.DBNull.Value int x Convert.ToInt32..
Xml validation using XSD schema http://stackoverflow.com/questions/572853/xml-validation-using-xsd-schema new StringReader document.InnerXml settings while rdr.Read isValid true The ValidationEventHandler also tells me what the..
C# stored procedure with parameters http://stackoverflow.com/questions/6201734/c-sharp-stored-procedure-with-parameters SqlDataReader rdr cmd.ExecuteReader if rdr.HasRows while rdr.Read string serverIP rdr ServerIP .ToString ScheduledTasks st new..
“Invalid attempt to call Read when reader is closed” error (for lengthy operations only) http://stackoverflow.com/questions/6775136/invalid-attempt-to-call-read-when-reader-is-closed-error-for-lengthy-operatio rdr null try rdr DbDataReader db.ExecuteReader cmd if rdr.Read if String.IsNullOrEmpty Utility.GetString rdr NewZipCode strNewZipCode.. Utility.GetString rdr NewZipCode rdr.NextResult if rdr.Read strRetiredZipCode strRetiredZipCode Utility.GetString rdr RetiredZipCode..
Return DataReader from DataLayer in Using statement http://stackoverflow.com/questions/850065/return-datareader-from-datalayer-in-using-statement cn.Open using IDataReader rdr cmd.ExecuteReader while rdr.Read yield return IDataRecord rdr This will work even better..
|