Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
More Jobs
Recent
Displaying numbers to words.
Williams Words
Doing a 'blank?' in named_scope
Factoring Integers
Filterting a List<> with a Regular Expression
Converting Textile to S5
Efficiently load a text file into a sorted String Array
Cheap ruby block templating
Bindings on caller
Initial script execution very slow and skewing results
Popular
Displaying numbers to words.
Filterting a List<> with a Regular Expression
Efficiently load a text file into a sorted String Array
Factoring Integers
Doing a 'blank?' in named_scope
Converting Textile to S5
Williams Words
Caching Methods
Cheap ruby block templating
How to find max, min of three numbers?
Pastable version of
TableAdapter and CommandTimeout
<div style="overflow:auto;border:solid 1px #ccc;background:#000;color:#F8F8F8"> <div class="section"> <pre style="float:left;margin:0 10px;border-right:0;color:#666;">1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32</pre> <pre class="sunburst"><span style="color:#E28964;">namespace</span> DataSetTableAdapters { partial <span style="color:#99CF50;">class</span> MyTableAdapter { <span style="color:#E28964;">public</span> <span style="color:#99CF50;">int</span> InsertCommandTimeout { get { <span style="color:#E28964;">return</span> (<span style="color:#E28964;">this</span>.Adapter.InsertCommand.CommandTimeout); } set { <span style="color:#E28964;">this</span>.Adapter.InsertCommand.CommandTimeout = value; } } <span style="color:#E28964;">public</span> <span style="color:#99CF50;">int</span> UpdateCommandTimeout { get { <span style="color:#E28964;">return</span> (<span style="color:#E28964;">this</span>.Adapter.UpdateCommand.CommandTimeout); } set { <span style="color:#E28964;">this</span>.Adapter.UpdateCommand.CommandTimeout = value; } } <span style="color:#E28964;">public</span> <span style="color:#99CF50;">int</span> DeleteCommandTimeout { get { <span style="color:#E28964;">return</span> (<span style="color:#E28964;">this</span>.Adapter.DeleteCommand.CommandTimeout); } set { <span style="color:#E28964;">this</span>.Adapter.DeleteCommand.CommandTimeout = value; } } <span style="color:#E28964;">public</span> <span style="color:#99CF50;">int</span> SelectCommandTimeout { get { <span style="color:#E28964;">return</span> (<span style="color:#E28964;">this</span>.CommandCollection[<span style="color:#3387CC;">0</span>].CommandTimeout); } set { <span style="color:#E28964;">for</span> (<span style="color:#99CF50;">int</span> i = <span style="color:#3387CC;">0</span>; (i < <span style="color:#E28964;">this</span>.CommandCollection.Length); i = (i + <span style="color:#3387CC;">1</span>)) { <span style="color:#E28964;">if</span> ((<span style="color:#E28964;">this</span>.CommandCollection[i] != <span style="color:#E28964;">null</span>)) { ((global::System.Data.SqlClient.SqlCommand)(<span style="color:#E28964;">this</span>.CommandCollection[i])).CommandTimeout = value; } } } } } } </pre> </div> </div> <a href="http://www.refactormycode.com/codes/346-tableadapter-and-commandtimeout" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>