<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>(slightly) Behind the Curve</title>
	<atom:link href="http://slightlybehindthecurve.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://slightlybehindthecurve.wordpress.com</link>
	<description>web and Windows development</description>
	<lastBuildDate>Mon, 30 Jan 2012 14:04:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='slightlybehindthecurve.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>(slightly) Behind the Curve</title>
		<link>http://slightlybehindthecurve.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://slightlybehindthecurve.wordpress.com/osd.xml" title="(slightly) Behind the Curve" />
	<atom:link rel='hub' href='http://slightlybehindthecurve.wordpress.com/?pushpress=hub'/>
		<item>
		<title>count all updated tables in a database, oracle version</title>
		<link>http://slightlybehindthecurve.wordpress.com/2012/01/30/count-all-updated-tables-in-a-database-oracle-version/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2012/01/30/count-all-updated-tables-in-a-database-oracle-version/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 14:03:23 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=202</guid>
		<description><![CDATA[OUTPUT &#8211; this produces a script that you can execute that produces text to the output window with each table and a count of recent updates and additions. set serveroutput on format WRAPPED; --CREATE GLOBAL TEMPORARY TABLE my_temp_table ( TableName varchar(50), CountRecentUpdates INTEGER) ON COMMIT DELETE ROWS; declare t_name varchar(150); c_name varchar(150); query_base varchar(250); squery [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=202&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>OUTPUT &#8211; this  produces a script that you can execute that produces text to the output window with each table and a count of recent updates and additions.</p>
<p><code><br />
 set serveroutput on format WRAPPED;</p>
<p>--CREATE GLOBAL TEMPORARY TABLE my_temp_table (  TableName  varchar(50),  CountRecentUpdates  INTEGER) ON COMMIT DELETE ROWS;</p>
<p> declare<br />
t_name varchar(150);<br />
c_name varchar(150);<br />
query_base varchar(250);<br />
squery varchar(500);<br />
TempTableInsert varchar(80) := ' insert into my_temp_table ( TableName  , CountRecentUpdates ) ' ; </p>
<p>cursor ci is<br />
select table_name , column_name from all_tab_columns<br />
where  rownum  SYSDATE-2 ;';</p>
<p>query_base :=  'select ''QQQTABLE''  ,  count(*)  as CountRecentUpdates into st, k  from QQQTABLE where QQQCOLUMN &gt; SYSDATE-1 ; DBMS_OUTPUT.put_line  (st  || ''       '' ||  TO_CHAR(k) );';</p>
<p>open ci;</p>
<p>LOOP<br />
fetch  ci into t_name , c_name;</p>
<p>exit when ci%NOTFOUND;</p>
<p>-- http://psoug.org/reference/translate_replace.html<br />
  squery := replace(query_base , 'QQQTABLE' , t_name );<br />
  squery := replace(squery , 'QQQCOLUMN' , c_name );<br />
-- query to write to temp table<br />
--  squery := TempTableInsert ||  squery ;</p>
<p>-- print the query<br />
DBMS_OUTPUT.put_line  ( squery  );<br />
-- execute the query<br />
-- EXEC SQL EXECUTE IMMEDIATE :squery ;</p>
<p>end loop;<br />
close ci;</p>
<p>DBMS_OUTPUT.put_line  ( '    END;   '   );</p>
<p>END;<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=202&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2012/01/30/count-all-updated-tables-in-a-database-oracle-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>count database updates for all tables</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/10/17/count-database-updates-for-all-tables/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/10/17/count-database-updates-for-all-tables/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:50:26 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=198</guid>
		<description><![CDATA[To count all database updates for all tables (that containe a datetime field), just execute this query: &#8211; purpose &#8211; see if this database is being updated &#8211; use a set of queries on datetime fields. &#8211; Make the queries dynamic, and pass in the table and column names. &#8211; collate results into a temp [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=198&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To count all database updates for all tables (that containe a datetime field), just execute this query:</p>
<p>&#8211; purpose &#8211; see if this database is being updated<br />
&#8211; use a set of queries on datetime fields.<br />
&#8211; Make the queries dynamic, and pass in the table and column names.<br />
&#8211; collate results into a temp table and then display all together<br />
declare @t_name varchar(50)<br />
declare @c_name varchar(50)<br />
declare @query_base varchar(250)<br />
set @query_base = &#8216;select {QQQTABLE} as [TableName], count(*) as CountRecentUpdates from QQQTABLE where QQQCOLUMN &gt; dateadd(d,-1,getdate() )&#8217;<br />
declare @query varchar(500)<br />
declare @TempTableInsert varchar(80)<br />
set @TempTableInsert = &#8216; insert into #MyTempTable ([TableName]  , [CountRecentUpdates] ) &#8216;</p>
<p>CREATE TABLE #MyTempTable ([TableName] varchar(50), [CountRecentUpdates] varchar(50) )</p>
<p>declare ci  cursor for<br />
SELECT     TABLE_NAME, COLUMN_NAME<br />
FROM         INFORMATION_SCHEMA.COLUMNS<br />
WHERE     (DATA_TYPE = &#8216;datetime&#8217;) AND (NOT (COLUMN_DEFAULT IS NULL))</p>
<p>open ci</p>
<p>fetch next from ci into<br />
@t_name,<br />
@c_name</p>
<p>WHILE @@FETCH_STATUS = 0</p>
<p>BEGIN</p>
<p>&#8211;print   @t_name + &#8216;  &#8216; +  @c_name</p>
<p>set @query = replace(@query_base,&#8217;QQQTABLE&#8217;, @t_name)<br />
set @query = replace(@query ,&#8217;QQQCOLUMN&#8217;, @c_name)<br />
set @query = replace(@query ,&#8217;{&#8216; , char(39) )<br />
set @query = replace(@query ,&#8217;}&#8217; , char(39) )<br />
set @query = @TempTableInsert + @query<br />
&#8211;print @query<br />
EXECUTE(@query)<br />
&#8211; *************************************************************<br />
&#8211; RE-LOAD THE CURSOR<br />
fetch next from ci into<br />
@t_name,<br />
@c_name</p>
<p>end<br />
close ci<br />
deallocate ci</p>
<p>select * from #MyTempTable<br />
drop table #MyTempTable</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=198&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/10/17/count-database-updates-for-all-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>mvc db context error</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/10/17/mvc-db-context-error/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/10/17/mvc-db-context-error/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:45:25 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=196</guid>
		<description><![CDATA[I was following the MVC Movie example, and decided at one point not to follow the directions strictly. (http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part7-cs) I got the error: &#8220;The model backing the &#8216;MovieDBContext&#8217; context has changed since the database was created. &#8220; There is a fix described at http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc But, I just deleted the table from movies.sdf that had the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=196&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was following the MVC Movie example, and decided at one point not to follow the directions strictly. (http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part7-cs)</p>
<p>I got the error: &#8220;The model backing the &#8216;MovieDBContext&#8217; context has changed since the database was created. &#8220;</p>
<p>There is a fix described at http://stackoverflow.com/questions/3552000/entity-framework-code-only-error-the-model-backing-the-context-has-changed-sinc</p>
<p>But, I just deleted the table from movies.sdf that had the index definitions in it, and things started working again.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=196&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/10/17/mvc-db-context-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>mvc3 install</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/08/02/mvc3-install/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/08/02/mvc3-install/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 14:12:23 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[mvc3 install]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=192</guid>
		<description><![CDATA[see http://blog.mjjames.co.uk/2010/12/mvc-3-rc2-install-error-0&#215;80070643.html I had the common problem where vstudio 2010 wouldn&#8217;t update. The following worked: 1) start AspNetMVC3ToolsUpdateSetup.exe, let it stop at the acknowledge screen 2) go to the c:\temp directory and copy the directory of unpacked files 3) run the vstudio kb update exe separately (mine worked) 4) then go back and run AspNetMVC3ToolsUpdateSetup.exe. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=192&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>see http://blog.mjjames.co.uk/2010/12/mvc-3-rc2-install-error-0&#215;80070643.html</p>
<p>I had the common problem where vstudio 2010 wouldn&#8217;t update.</p>
<p>The following worked:<br />
1) start AspNetMVC3ToolsUpdateSetup.exe, let it stop at the acknowledge screen<br />
2) go to the c:\temp directory and copy the directory of unpacked files<br />
3) run the vstudio kb update exe separately (mine worked)<br />
4) then go back and run AspNetMVC3ToolsUpdateSetup.exe. I always ran as administrator.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=192&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/08/02/mvc3-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>summarize a datatable</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/06/23/summarize-a-datatable/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/06/23/summarize-a-datatable/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 13:57:19 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=188</guid>
		<description><![CDATA[This might be ugly code &#8230; but I just dropped it into an admin page on a project, and it worked first time. Contains comments that tell how to use it. What does it do? It takes a datatable and sums the columns that you tell it to, and then appends this row to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=188&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This might be ugly code &#8230; but I just dropped it into an admin page on a project, and it worked first time. Contains comments that tell how to use it.<br />
What does it do? It takes a datatable and sums the columns that you tell it to, and then appends this row to the bottom of the table.<br />
<code></p>
<p>    ' ---------------------------------------------------------<br />
    ' purpose - summarize a datatable by summing selected columns<br />
    ' INPUTS: title column, sum columns<br />
    ' HOW TO USE:<br />
    'Dim iret As Integer<br />
    'iret = objD.SummaryRow(dt,0, 3, "Total:", 5)<br />
    ' (put the count of rows in the 0 column, the Total string in col 3, and the sum in column 5)<br />
    ' you can add up to 10 columns to sum<br />
    ' be careful not to put strings into datetime columns, for example<br />
    Function SummaryRow( _<br />
    ByRef dt As System.Data.DataTable, _<br />
    ByVal iCountCol As Integer, _<br />
    ByVal iTitleCol As Integer, _<br />
    ByVal sTitle As String, _<br />
    Optional ByVal i0 As Integer = 0, _<br />
    Optional ByVal i1 As Integer = 0, _<br />
    Optional ByVal i2 As Integer = 0, _<br />
    Optional ByVal i3 As Integer = 0, _<br />
    Optional ByVal i4 As Integer = 0, _<br />
    Optional ByVal i5 As Integer = 0, _<br />
    Optional ByVal i6 As Integer = 0, _<br />
    Optional ByVal i7 As Integer = 0, _<br />
    Optional ByVal i8 As Integer = 0, _<br />
    Optional ByVal i9 As Integer = 0) As Integer<br />
        Dim iParms As New ArrayList<br />
        If (i0 &gt; 0) Then iParms.Add(i0)<br />
        If (i1 &gt; 0) Then iParms.Add(i1)<br />
        If (i2 &gt; 0) Then iParms.Add(i2)<br />
        If (i3 &gt; 0) Then iParms.Add(i3)<br />
        If (i4 &gt; 0) Then iParms.Add(i4)<br />
        If (i5 &gt; 0) Then iParms.Add(i5)<br />
        If (i6 &gt; 0) Then iParms.Add(i6)<br />
        If (i7 &gt; 0) Then iParms.Add(i7)<br />
        If (i8 &gt; 0) Then iParms.Add(i8)<br />
        If (i9 &gt; 0) Then iParms.Add(i9)<br />
        Try<br />
            Dim NewSummaryRow As System.Data.DataRow = dt.NewRow<br />
            NewSummaryRow(iTitleCol) = sTitle<br />
            Dim s As Decimal = 0</p>
<p>            For i As Integer = 0 To iParms.Count - 1<br />
                s = 0<br />
                Dim kolumn As Integer = iParms(i)<br />
                NewSummaryRow(kolumn) = 666 ' default it</p>
<p>                For Each r As System.Data.DataRow In dt.Rows<br />
                    s += r(kolumn)<br />
                Next<br />
                NewSummaryRow(kolumn) = s<br />
            Next<br />
            NewSummaryRow(iCountCol) = "Count:" + dt.Rows.Count.ToString<br />
            dt.Rows.Add(NewSummaryRow)<br />
        Catch ex As Exception<br />
            Diagnostics.Debug.Print("!!!!!!!!!!!!!!!!!! ERROR utils_data.SummaryRow " &amp; ex.ToString())<br />
            Return -1<br />
        End Try<br />
        Return 1<br />
    End Function</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=188&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/06/23/summarize-a-datatable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>fix all submit buttons at one swell foop</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/05/25/fix-all-submit-buttons-at-one-swell-foop/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/05/25/fix-all-submit-buttons-at-one-swell-foop/#comments</comments>
		<pubDate>Wed, 25 May 2011 15:46:02 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=179</guid>
		<description><![CDATA[The problem: my users are apparently getting clicky on me and causing multiple additions of data for us. When the application was first developed, we did not bounce-protect the buttons, because it was not a credit-card related application, and we didn&#8217;t think about it. Techniquest you&#8217;ll learn: 1) a number of jQuery tricks 2) perhaps [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=179&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The problem: my users are apparently getting clicky on me and causing multiple additions of data for us. When the application was first developed, we did not bounce-protect the buttons, because it was not a credit-card related application, and we didn&#8217;t think about it.</p>
<p>Techniquest you&#8217;ll learn:<br />
1) a number of jQuery tricks<br />
2) perhaps more deeply how Asp.Net form submit works (how it passes &#8220;event&#8221; to the server). We provide a bullet proof function to create the necessary hidden variables and add them to the DOM even if you don&#8217;t have any controls set to AutoPostback.</p>
<p>How to try this yourself:<br />
<strong>ASPX and  in-line Javascript</strong><br />
<img src="http://slightlybehindthecurve.files.wordpress.com/2011/05/html_image.png?w=450" alt="screen capture of my html" /><br />
<strong>safeSubmit.js file</strong><br />
* we bind a javascript click event to every submit button in the current page (we&#8217;re thinking to plug this into our master page to fix the entire project)<br />
* set_event_hidden_vars &#8211; creates EVENTTARGET and EVENTCOMMAND if they don&#8217;t already exist<br />
* safe_submit &#8211; disables the button and communicates with the user. We put a delay in before the submit because otherwise the user wouldn&#8217;t see any of our cosmetic changes to the button.<br />
<code></p>
<p>// purpose - select all the submit buttons, and then bind a safe submit function to them<br />
function bindEvents() {<br />
    // get an array of inputs of type submit<br />
    var btnArray = $(':submit');</p>
<p>    for (var i = 0; i &lt; btnArray.length; i++) {<br />
        var btn = btnArray[i];<br />
        //use jQuery to get the btn, then call bind<br />
        if (btn != null) $(btn).bind(&quot;click&quot;, safe_submit); // this syntax runs, but it doesn&#039;t pass the the this object<br />
    }</p>
<p>}</p>
<p>// purpose - if the asp.net hidden vars that simulate events are present, use them.<br />
// otherwise, create them with the correct values<br />
function set_event_hidden_vars(btn) {<br />
    var hdn = document.getElementById(&#039;__EVENTTARGET&#039;);<br />
    if (hdn == null) {<br />
        var shdn = &#039;';<br />
        shdn = shdn.replace('qqq', btn.id);<br />
        var h = $(shdn);<br />
        $(document.forms[0]).append(h); // my pages are submitting from form[0]<br />
        //$('form').append(h);</p>
<p>        var scmd = '';<br />
        var c = $(scmd);<br />
        $(document.forms[0]).append(c);<br />
        //$('form').append(c);<br />
    }<br />
    else hdn.value = btn.id;</p>
<p>}</p>
<p>// purpose - general routine to submit a button but to disable it so we don't get double clicks<br />
function safe_submit(p) {<br />
    if (bShowAlerts &gt; 0) alert('safe_submit');<br />
    if (p == null) {<br />
        alert('p is null');<br />
        return false;<br />
    }<br />
    var btnArray = $(this);<br />
    var btn = btnArray[0];<br />
    if (btn != null) {<br />
        // show the user that the button has changed<br />
        // $(btn).hide('slow'); // this worked<br />
        //$(btn).css("background-color", "green");<br />
        $(btn).css("border-color", "white");<br />
        $(btn).css("foreground-color", "white");<br />
        $(btn).val("Please wait a bit ...");<br />
        btn.disabled = true;</p>
<p>        if (bShowAlerts &gt; 0) alert('safe_submit ' + btn.id)</p>
<p>        // the hidden vars communicate with the server<br />
        set_event_hidden_vars(btn)</p>
<p>        setTimeout(submit_after_delay, 500);</p>
<p>    }<br />
    else {<br />
        alert('the button was null');<br />
        return false;<br />
    }</p>
<p>}</p>
<p>function submit_after_delay() {<br />
    document.forms[0].submit();<br />
}</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=179&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/05/25/fix-all-submit-buttons-at-one-swell-foop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>

		<media:content url="http://slightlybehindthecurve.files.wordpress.com/2011/05/html_image.png" medium="image">
			<media:title type="html">screen capture of my html</media:title>
		</media:content>
	</item>
		<item>
		<title>udf function to return words for money</title>
		<link>http://slightlybehindthecurve.wordpress.com/2011/02/14/udf-function-to-return-words-for-money/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2011/02/14/udf-function-to-return-words-for-money/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 20:14:21 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=173</guid>
		<description><![CDATA[We started using this function because crystal reports has a nice formatting function to do the number to words conversion, but I think that Microsoft SQL Reporting doesn&#8217;t have such a function. modified from the original to allow billions and also negatives examples: SELECT [dbo].[fnMoneyToEnglish] ( -999999999999.12 ) returns ( Nine Hundred Ninety-Nine Billion Nine [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=173&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We started using this function because crystal reports has a nice formatting function to do the number to words conversion, but I think that Microsoft SQL Reporting doesn&#8217;t have such a function. </p>
<p>modified from the original to allow billions and also negatives </p>
<p>examples:<br />
SELECT [dbo].[fnMoneyToEnglish] ( -999999999999.12 )<br />
returns<br />
 ( Nine Hundred Ninety-Nine Billion Nine Hundred Ninety-Nine Million Nine Hundred Ninety-Nine Thousand Nine Hundred Ninety-Nine Dollars and 12 Cents )</p>
<p>SELECT [dbo].[fnMoneyToEnglish] (-10.11)<br />
returns<br />
( Ten Dollars and 11 Cents )</p>
<p><code><br />
USE [BursarReceipt]<br />
GO</p>
<p>/****** Object:  UserDefinedFunction [dbo].[fnMoneyToEnglish]    Script Date: 02/14/2011 11:29:23 ******/<br />
SET ANSI_NULLS ON<br />
GO</p>
<p>SET QUOTED_IDENTIFIER ON<br />
GO</p>
<p>-- http://www.sqlusa.com/bestpractices2005/moneyformat/<br />
-- SQL convert dollar amount into words for check printing - Dollars and cents format<br />
-- Convert numbers to words - SQL amount into words - Currency to words<br />
-- SQL money format to English - Translate money to text<br />
-- Translate dollar amount to words - Convert numbers into English words<br />
ALTER FUNCTION [dbo].[fnMoneyToEnglish](@Money AS Money) </p>
<p>    RETURNS VARCHAR(1024)</p>
<p>AS</p>
<p>BEGIN<br />
      DECLARE @Number as BIGINT<br />
      DECLARE @MinusFlag as Bit</p>
<p>      if @Money &lt; 0<br />
      begin<br />
      set @Money = -1 * @Money<br />
      Set @MinusFlag = 1<br />
      end</p>
<p>      SET @Number = FLOOR(@Money)</p>
<p>      DECLARE @Below20 TABLE (ID int identity(0,1), Word varchar(32))</p>
<p>      DECLARE @Below100 TABLE (ID int identity(2,1), Word varchar(32))</p>
<p>      INSERT  into @Below20 (Word) VALUES ( &#039;Zero&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;One&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Two&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Three&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Four&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Five&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Six&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Seven&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Eight&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Nine&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Ten&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Eleven&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Twelve&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Thirteen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Fourteen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Fifteen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Sixteen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Seventeen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Eighteen&#039;)<br />
      INSERT  into @Below20 (Word) VALUES (&#039;Nineteen&#039;) </p>
<p>      INSERT  into @Below100 (Word) VALUES (&#039;Twenty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Thirty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Forty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Fifty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Sixty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Seventy&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Eighty&#039;)<br />
      INSERT  into @Below100 (Word) VALUES (&#039;Ninety&#039;) </p>
<p>DECLARE @English varchar(1024)<br />
(<br />
  SELECT @English =<br />
   Case </p>
<p>    WHEN @Number = 0 THEN  &#039;&#039;</p>
<p>    WHEN @Number BETWEEN 1 AND 19 </p>
<p>      THEN (SELECT Word FROM @Below20 WHERE ID=@Number)</p>
<p>   WHEN @Number BETWEEN 20 AND 99</p>
<p>-- SQL Server recursive function    </p>
<p>     THEN  (SELECT Word FROM @Below100 WHERE ID=@Number/10)+ &#039;-&#039; +</p>
<p>           dbo.fnMoneyToEnglish( @Number % 10) </p>
<p>   WHEN @Number BETWEEN 100 AND 999   </p>
<p>     THEN  (dbo.fnMoneyToEnglish( @Number / 100))+&#039; Hundred &#039;+</p>
<p>         dbo.fnMoneyToEnglish( @Number % 100) </p>
<p>   WHEN @Number BETWEEN 1000 AND 999999   </p>
<p>     THEN  (dbo.fnMoneyToEnglish( @Number / 1000))+&#039; Thousand &#039;+</p>
<p>         dbo.fnMoneyToEnglish( @Number % 1000)  </p>
<p>   WHEN @Number BETWEEN 1000000 AND 999999999   </p>
<p>     THEN  (dbo.fnMoneyToEnglish( @Number / 1000000))+&#039; Million &#039;+</p>
<p>         dbo.fnMoneyToEnglish( @Number % 1000000) </p>
<p>   WHEN @Number BETWEEN 1000000000 AND 999999999999   </p>
<p>     THEN  (dbo.fnMoneyToEnglish( @Number / 1000000000))+&#039; Billion &#039;+</p>
<p>         dbo.fnMoneyToEnglish( @Number % 1000000000) </p>
<p>   ELSE &#039; INVALID INPUT&#039; END</p>
<p>)</p>
<p>SELECT @English = RTRIM(@English)</p>
<p>SELECT @English = RTRIM(LEFT(@English,len(@English)-1))</p>
<p>                 WHERE RIGHT(@English,1)=&#039;-&#039;</p>
<p>IF @@NestLevel = 1</p>
<p>BEGIN</p>
<p>      SELECT @English = @English+&#039; Dollars and &#039;<br />
      SELECT @English = @English+<br />
      convert(varchar,convert(int,100*(@Money - @Number))) +&#039; Cents&#039;<br />
      if (@MinusFlag = 1)<br />
      begin<br />
      set @English = &#039;( &#039; + @English + &#039; )&#039;<br />
      end</p>
<p>END</p>
<p>RETURN (@English)</p>
<p>END </p>
<p>GO</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=173&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2011/02/14/udf-function-to-return-words-for-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>Unit testing with web services</title>
		<link>http://slightlybehindthecurve.wordpress.com/2010/06/17/unit-testing-with-web-services/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2010/06/17/unit-testing-with-web-services/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 18:40:36 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=171</guid>
		<description><![CDATA[I&#8217;m currently using visual studio 2008 unit testing to develop a class library, and into the library I put one of my classes that calls a web service. So I added a service reference to the class library. But when I tried to test something that intantated the web service client, I kept getting weird [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=171&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently using visual studio 2008 unit testing to develop a class library, and into the library I put one of my classes that calls a web service. So I added a service reference to the class library.</p>
<p>But when I tried to test something that intantated the web service client, I kept getting weird errors as I ran the unit test.</p>
<p>It turns out that when I copied the app.config from the class library that included the web service definitions into the app.config of the unit testing project, the error went away. I&#8217;m not sure why the debugging project needs to have the service definitions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=171&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2010/06/17/unit-testing-with-web-services/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF databinding</title>
		<link>http://slightlybehindthecurve.wordpress.com/2010/06/16/wpf-databinding/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2010/06/16/wpf-databinding/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 20:57:29 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=169</guid>
		<description><![CDATA[ok, so I never got the databinding to work quite right between my listbox and the various add,update,delete operations I was doing with Linq to SQL. However, I did get it all to look good, with the listbox getting updated, and this is how I did it. The magic function was: GetNewBindingList called from my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=169&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>ok, so I never got the databinding to work quite right between my listbox and the various add,update,delete operations I was doing with Linq to SQL.</p>
<p>However, I did get it all to look good, with the listbox getting updated, and this is how I did it.</p>
<p>The magic function was: GetNewBindingList called from my linq table object.</p>
<p> Somehow it feels like the linq to sql class should inform the listbox that it needs to refresh and there should be some magic setting, but for the time being:<br />
XAML extract:<br />
<code><br />
set the datasource in the window:<br />
&lt;Window x:Class=&quot;HomerV3_Queries.Window_Queries&quot;<br />
     DataContext=&quot;{Binding RelativeSource={RelativeSource Self}}&quot;<br />
bind to it at the listbox. &quot;Queries&quot; is the table I&#039;m binding to.:<br />
                  ItemsSource=&quot;{Binding Path=Queries,UpdateSourceTrigger=PropertyChanged}&quot;</p>
<p></code></p>
<p>C# code called after every database change &#8211; note the commented out stuff that does not work:<br />
<code></p>
<p>        void PageRefresh()<br />
        {<br />
            //_context.SubmitChanges();</p>
<p>            //_context.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues, _context.Queries);<br />
            //lbQueries.UpdateLayout();<br />
            //lbQueries.ItemsSource = null;<br />
            //lbQueries.Items.Clear();<br />
            lbQueries.ItemsSource = _context.Queries.GetNewBindingList();<br />
            //lbQueries.Refresh();<br />
            lbQueries.SelectedIndex = -1;<br />
            txtQuery.Text = "";<br />
            txtTitle.Text = "";<br />
        }</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=169&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2010/06/16/wpf-databinding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
		<item>
		<title>sharepoint 2010 just installed</title>
		<link>http://slightlybehindthecurve.wordpress.com/2010/06/09/sharepoint-2010-just-installed/</link>
		<comments>http://slightlybehindthecurve.wordpress.com/2010/06/09/sharepoint-2010-just-installed/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 14:02:47 +0000</pubDate>
		<dc:creator>slightlybehindthecurve</dc:creator>
				<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://slightlybehindthecurve.wordpress.com/?p=167</guid>
		<description><![CDATA[why should I feel such a sense of triumph at finally getting this to work on my windows 7 laptop? Probably I had made some mistakes along the way &#8211; notably when I installed sql server enterprise on top of developer, and then applied the wrong file for the service pack 1 for about a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=167&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>why should I feel such a sense of triumph at finally getting this to work on my windows 7 laptop? Probably I had made some mistakes along the way &#8211; notably when I installed sql server enterprise on top of developer, and then applied the wrong file for the service pack 1 for about a week. </p>
<p>I think it was a little weird that installing the identity framework did not work, but installing Geneva did (I had never previously installed Geneva, so perhaps the identity service pack wasn&#8217;t doing anything for me).</p>
<p>The best resource (in addition to the msdn doc on how to install 2010) is probably the Rehman Gul blog post titled &#8220;Sharepoint 2010 Configuration Wizard Errors on Windows 7&#8243;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/slightlybehindthecurve.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/slightlybehindthecurve.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/slightlybehindthecurve.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=slightlybehindthecurve.wordpress.com&amp;blog=3019836&amp;post=167&amp;subd=slightlybehindthecurve&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://slightlybehindthecurve.wordpress.com/2010/06/09/sharepoint-2010-just-installed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c3ff85306afa0f4532c07f64a8ad078e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">slightlybehindthecurve</media:title>
		</media:content>
	</item>
	</channel>
</rss>
