<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>SQLPSX Forum Rss Feed</title><link>http://www.codeplex.com/SQLPSX/Thread/List.aspx</link><description>SQLPSX Forum Rss Description</description><item><title>New Post: SQLPSX Online Help</title><link>http://sqlpsx.codeplex.com/discussions/443014</link><description>&lt;div style="line-height: normal;"&gt;Dead link on&lt;br /&gt;
&lt;a href="https://sqlpsx.codeplex.com/documentation" rel="nofollow"&gt;https://sqlpsx.codeplex.com/documentation&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Supposed to open &lt;a href="http://www.sqlpsx.com/" rel="nofollow"&gt;http://www.sqlpsx.com/&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>MarkTab</author><pubDate>Wed, 08 May 2013 20:42:43 GMT</pubDate><guid isPermaLink="false">New Post: SQLPSX Online Help 20130508084243P</guid></item><item><title>New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP.</title><link>http://sqlpsx.codeplex.com/discussions/435411</link><description>&lt;div style="line-height: normal;"&gt;Yes i know. I'm not pointing in that direction, i'm pointing to the fact that if a function is created to create db users, it should verify if the login specified  is a group or not and then create it with or without default schema (default_schema = DBO for users / default_Schema is not parsed for user based on groups )   ?  Now the function just checks if a default_schema is given or not. If not it passes DBO. It should not pass anything in case the instance login is an AD group.  to my feeling, this is a bug.&lt;br /&gt;
&lt;br /&gt;
For my issue, it's solved.  Perhaps in a future release this can be caught? &lt;br /&gt;
&lt;br /&gt;
anyway, great set of functions !&lt;br /&gt;
&lt;/div&gt;</description><author>kristofdm</author><pubDate>Tue, 05 Mar 2013 13:54:49 GMT</pubDate><guid isPermaLink="false">New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP. 20130305015449P</guid></item><item><title>New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP.</title><link>http://sqlpsx.codeplex.com/discussions/435411</link><description>&lt;div style="line-height: normal;"&gt;This issue is an underlying SQL Server feautre. As you've noticed you cannot assign a default schema to a Windows group. See this connect item for more details: &lt;a href="http://connect.microsoft.com/SQLServer/feedback/details/328585/default-schema-for-windows-group" rel="nofollow"&gt;http://connect.microsoft.com/SQLServer/feedback/details/328585/default-schema-for-windows-group&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>cmille19</author><pubDate>Tue, 05 Mar 2013 13:03:19 GMT</pubDate><guid isPermaLink="false">New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP. 20130305010319P</guid></item><item><title>New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP.</title><link>http://sqlpsx.codeplex.com/discussions/435411</link><description>&lt;div style="line-height: normal;"&gt;Hi, If i create a LOGIN based on a windows group it seems impossible to add it as 'USER' to a database because of the default_schema that is always used by the add-sqluser command. A Default schema can't be set for DBUSERS based on INSTANCE users based on windows groups.   i'm downloading the source code now to see if i can adapt the cmdlet  to my needs.&lt;br /&gt;
&lt;br /&gt;
Add-SqlUser : Exception calling &amp;quot;Create&amp;quot; with &amp;quot;0&amp;quot; argument(s): &amp;quot;Create failed for User 'G.r-Server123_MgmtDb_db_ddladmin'. &amp;quot;&lt;br /&gt;
Microsoft.SqlServer.Management.Smo.FailedOperationException: Create failed for User 'G.R-srvbedi172_DemeMgmtDb_db_ddladmin'.  ---&amp;gt; Microsoft.SqlServer.Manageme&lt;br /&gt;
nt.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---&amp;gt; System.Data.SqlClient.SqlException: The DEFA&lt;br /&gt;
ULT_SCHEMA clause cannot be used with a Windows group or with principals mapped to certificates or asymmetric keys.&lt;br /&gt;
   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchExcept&lt;br /&gt;
ion)&lt;br /&gt;
&lt;/div&gt;</description><author>kristofdm</author><pubDate>Tue, 05 Mar 2013 10:28:34 GMT</pubDate><guid isPermaLink="false">New Post: add-sqluser =&gt; uses DEFAULT_SCHEMA for SQLUSER  linked to SQLLOGIN on WINDOWS GROUP. 20130305102834A</guid></item><item><title>New Post: When will we see a new release of SQLPSX?</title><link>http://sqlpsx.codeplex.com/discussions/429872</link><description>&lt;div style="line-height: normal;"&gt;I've built test case using PSUnit. See the Source Code under TestScripts &lt;a href="http://sqlpsx.codeplex.com/SourceControl/changeset/view/132346a9e30d" rel="nofollow"&gt;http://sqlpsx.codeplex.com/SourceControl/changeset/view/132346a9e30d&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Again if you'd like to contribute back to SQLPSX, let me know and I'll add you as developer to the project.&lt;br /&gt;
&lt;/div&gt;</description><author>cmille19</author><pubDate>Wed, 27 Feb 2013 12:19:43 GMT</pubDate><guid isPermaLink="false">New Post: When will we see a new release of SQLPSX? 20130227121943P</guid></item><item><title>New Post: When will we see a new release of SQLPSX?</title><link>http://sqlpsx.codeplex.com/discussions/429872</link><description>&lt;div style="line-height: normal;"&gt;Chad,&lt;br /&gt;
&lt;br /&gt;
Thanks very much for your response. I totally understand your situation...&lt;br /&gt;
&lt;br /&gt;
We've decided to maintain and support SQLPSX ourselves, so we're fixing some issues and getting it ready for SQL Server 2012 and PowerShell 3.0.&lt;br /&gt;
&lt;br /&gt;
Can you share with us any unit/integration tests that we can execute as we make changes to SQLSPX to make sure we don't break any existing functionality?&lt;br /&gt;
&lt;br /&gt;
We use PSUNIT for unit testing (&lt;a href="http://www.psunit.org" rel="nofollow"&gt;www.psunit.org&lt;/a&gt;). Not sure if you use this unit testing frame work for PowerShell, but if you do, can you publish your tests?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Steve&lt;br /&gt;
&lt;/div&gt;</description><author>ruthst00</author><pubDate>Tue, 26 Feb 2013 18:03:15 GMT</pubDate><guid isPermaLink="false">New Post: When will we see a new release of SQLPSX? 20130226060315P</guid></item><item><title>New Post: set-sqldata</title><link>http://sqlpsx.codeplex.com/discussions/431979</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;You're correct, [string] should be omitted since the code inspects the parameter type to allow passing a database object as well as a database string.&lt;/p&gt;
&lt;p&gt;On Tuesday, February 5, 2013, ingted wrote:&lt;/p&gt;
&amp;lt;blockquote style=&amp;quot;margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex&amp;quot;&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;From: ingted&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;Hi^^ I'm not sure if this had been fixed or not. But in the Set-SqlData [Parameter(Position=1, Mandatory=$true)] [string] $dbname, it should be [Parameter(Position=1, Mandatory=$true)] $dbname, Maybe I'm wrong... not sure^^a Best regards Anibal&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/431979#post996507&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To start a new discussion for this project, email &amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/blockquote&amp;gt;
&lt;hr /&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a href="http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;" rel="nofollow"&gt;http://powershellstation.com"&gt;http://powershellstation.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>MikeShepard</author><pubDate>Tue, 05 Feb 2013 14:38:03 GMT</pubDate><guid isPermaLink="false">New Post: set-sqldata 20130205023803P</guid></item><item><title>New Post: set-sqldata</title><link>http://sqlpsx.codeplex.com/discussions/431979</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi^^&lt;/p&gt;
&lt;p&gt;I'm not sure if this had been fixed or not.&lt;/p&gt;
&lt;p&gt;But in the Set-SqlData&lt;/p&gt;
&lt;p&gt;[Parameter(Position=1, Mandatory=$true)] [string] $dbname,&lt;br /&gt;
it should be &lt;br /&gt;
[Parameter(Position=1, Mandatory=$true)] $dbname,&lt;/p&gt;
&lt;p&gt;Maybe I'm wrong... not sure^^a&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Anibal&lt;/p&gt;
&lt;/div&gt;</description><author>ingted</author><pubDate>Tue, 05 Feb 2013 06:46:23 GMT</pubDate><guid isPermaLink="false">New Post: set-sqldata 20130205064623A</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;No thank you for the work you have done. I appreciate it greatly.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;-JD&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div style=&amp;quot;border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;From:&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt; MikeShepard [email removed]


&amp;lt;b&amp;gt;Sent:&amp;lt;/b&amp;gt; Monday, February 04, 2013 2:57 PM

&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt; James Dorame

&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt; Re: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection [SQLPSX:400490]&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: MikeShepard&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div id=&amp;quot;ThreadNotificationPostBody&amp;quot; style=&amp;quot;margin-bottom:24.0pt&amp;quot;&amp;gt;
&amp;lt;p style=&amp;quot;margin-bottom:12.0pt&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;I found the issue.



In the new-connection function, the variable $dbclause isn't initialized if there isn't a database passed on the command-line.



I'll add $dbclause='' as the first line of the function and it will be all better.



I'll try to get the rest of the tests done with strict mode turned on (in fact, I'll put the strict mode switch in the module).



Thanks for being patient and persistent!



Mike





&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;On Mon, Feb 4, 2013 at 10:51 AM, JimDorame &amp;amp;lt;&amp;lt;a href=&amp;quot;mailto:notifications@codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;notifications@codeplex.com&amp;lt;/a&amp;gt;&amp;amp;gt; wrote:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: JimDorame&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Mike,&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;I finally figured out what was going on with the “&amp;lt;i&amp;gt;Variable”&amp;lt;/i&amp;gt; not defined error that I was getting sometimes.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;In my PowerShell scripts I use this line:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Set-StrictMode&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;
&amp;lt;i&amp;gt;-Version&amp;lt;/i&amp;gt; latest;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;I believe that not all the variables in SQLPSX are declared before use, which would cause the issue I was seeing.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;I tested this by removing the above line and all work as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Again thank you for your help.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;-JD&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div style=&amp;quot;border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From:&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt; MikeShepard [email removed]


&amp;lt;b&amp;gt;Sent:&amp;lt;/b&amp;gt; Thursday, January 31, 2013 3:05 PM

&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt; James Dorame

&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt; Re: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection [SQLPSX:400490]&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: MikeShepard&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div style=&amp;quot;margin-bottom:24.0pt&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Glad to help. Did you figure out what your problem with is-null was?



On Thursday, January 31, 2013, JimDorame wrote:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: JimDorame&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Thanks alot Mike. I forgot I needed to invoke System.DBNull. All is working as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post994893&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To start a new discussion for this project, email
&amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;



-- 

&amp;lt;a href=&amp;quot;http://powershellstation.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post996216&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com?subject=[SQLPSX:400490]&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To start a new discussion for this project, email
&amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;

&amp;lt;br clear=&amp;quot;all&amp;quot;&amp;gt;


-- 

&amp;lt;a href=&amp;quot;http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/div&gt;</description><author>JimDorame</author><pubDate>Mon, 04 Feb 2013 23:11:13 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130204111113P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I found the issue.&lt;/p&gt;
&lt;p&gt;In the new-connection function, the variable $dbclause isn't initialized if there isn't a database passed on the command-line.&lt;/p&gt;
&lt;p&gt;I'll add $dbclause='' as the first line of the function and it will be all better.&lt;/p&gt;
&lt;p&gt;I'll try to get the rest of the tests done with strict mode turned on (in fact, I'll put the strict mode switch in the module).&lt;/p&gt;
&lt;p&gt;Thanks for being patient and persistent!&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;
&amp;lt;div&amp;gt;On Mon, Feb 4, 2013 at 10:51 AM, JimDorame &amp;lt;span dir=&amp;quot;ltr&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;a href=&amp;quot;mailto:notifications@codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;notifications@codeplex.com&amp;lt;/a&amp;gt;&amp;amp;gt;&amp;lt;/span&amp;gt; wrote:

&amp;lt;blockquote style=&amp;quot;margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex&amp;quot;&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;From: JimDorame&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Mike,&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;I finally figured out what was going on with the “&amp;lt;i&amp;gt;Variable”&amp;lt;/i&amp;gt; not defined error that I was getting sometimes.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;In my PowerShell scripts I use this line:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span&amp;gt;Set-StrictMode&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;i&amp;gt;&amp;lt;span&amp;gt;-Version&amp;lt;/span&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;span&amp;gt;
&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;latest&amp;lt;/span&amp;gt;&amp;lt;span&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;I believe that not all the variables in SQLPSX are declared before use, which would cause the issue I was seeing.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;I tested this by removing the above line and all work as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Again thank you for your help.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;-JD&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div style=&amp;quot;border:none; border-top:solid #b5c4df 1.0pt; padding:3.0pt 0in 0in 0in&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span&amp;gt;From:&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span&amp;gt; MikeShepard [email removed] 

&amp;lt;b&amp;gt;Sent:&amp;lt;/b&amp;gt; Thursday, January 31, 2013 3:05 PM

&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt; James Dorame

&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt; Re: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection [SQLPSX:400490]&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;From: MikeShepard&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div style=&amp;quot;margin-bottom:24.0pt&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Glad to help. Did you figure out what your problem with is-null was?



On Thursday, January 31, 2013, JimDorame wrote:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;From: JimDorame&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Thanks alot Mike. I forgot I needed to invoke System.DBNull. All is working as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post994893&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;To start a new discussion for this project, email &amp;lt;a&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;



-- 

&amp;lt;a href=&amp;quot;http://powershellstation.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post996216&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com?subject=[SQLPSX:400490]&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To start a new discussion for this project, email &amp;lt;a href=&amp;quot;mailto:SQLPSX@discussions.codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/blockquote&amp;gt;
&amp;lt;/div&amp;gt;
&lt;p&gt;&amp;lt;br clear=&amp;quot;all&amp;quot;&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a href="http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;" rel="nofollow"&gt;http://powershellstation.com"&gt;http://powershellstation.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>MikeShepard</author><pubDate>Mon, 04 Feb 2013 20:57:04 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130204085704P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;Mike,&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;I finally figured out what was going on with the “&amp;lt;i&amp;gt;Variable”&amp;lt;/i&amp;gt; not defined error that I was getting sometimes.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;In my PowerShell scripts I use this line:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;Set-StrictMode&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;
&amp;lt;/span&amp;gt;&amp;lt;i&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;-Version&amp;lt;/span&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;
&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;latest&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;I believe that not all the variables in SQLPSX are declared before use, which would cause the issue I was seeing.
&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;I tested this by removing the above line and all work as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;Again thank you for your help.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;-JD&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div style=&amp;quot;border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;From:&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt; MikeShepard [email removed]


&amp;lt;b&amp;gt;Sent:&amp;lt;/b&amp;gt; Thursday, January 31, 2013 3:05 PM

&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt; James Dorame

&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt; Re: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection [SQLPSX:400490]&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: MikeShepard&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div id=&amp;quot;ThreadNotificationPostBody&amp;quot; style=&amp;quot;margin-bottom:24.0pt&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Glad to help. Did you figure out what your problem with is-null was?



On Thursday, January 31, 2013, JimDorame wrote:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: JimDorame&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Thanks alot Mike. I forgot I needed to invoke System.DBNull. All is working as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post994893&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To start a new discussion for this project, email
&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;



-- 

&amp;lt;a href=&amp;quot;http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/div&gt;</description><author>JimDorame</author><pubDate>Mon, 04 Feb 2013 16:51:14 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130204045114P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;Yes, the is-null issue had to deal with I was passing an empty string not a DBNull.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;Jim&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:11.0pt; font-family:&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;div style=&amp;quot;border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt;From:&amp;lt;/span&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;span style=&amp;quot;font-size:10.0pt; font-family:&amp;quot;&amp;gt; MikeShepard [email removed]


&amp;lt;b&amp;gt;Sent:&amp;lt;/b&amp;gt; Thursday, January 31, 2013 3:05 PM

&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt; James Dorame

&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt; Re: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection [SQLPSX:400490]&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: MikeShepard&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div id=&amp;quot;ThreadNotificationPostBody&amp;quot; style=&amp;quot;margin-bottom:24.0pt&amp;quot;&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Glad to help. Did you figure out what your problem with is-null was?



On Thursday, January 31, 2013, JimDorame wrote:&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;From: JimDorame&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Thanks alot Mike. I forgot I needed to invoke System.DBNull. All is working as expected.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post994893&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;To start a new discussion for this project, email
&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;span style=&amp;quot;font-size:9.0pt; font-family:&amp;quot;&amp;gt;



-- 

&amp;lt;a href=&amp;quot;http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/div&gt;</description><author>JimDorame</author><pubDate>Fri, 01 Feb 2013 18:16:34 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130201061634P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Glad to help. Did you figure out what your problem with is-null was?&lt;/p&gt;
&lt;p&gt;On Thursday, January 31, 2013, JimDorame wrote:&lt;/p&gt;
&amp;lt;blockquote style=&amp;quot;margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex&amp;quot;&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;From: JimDorame&amp;lt;/p&amp;gt;
&amp;lt;div&amp;gt;Thanks alot Mike. I forgot I needed to invoke System.DBNull. All is working as expected.&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;p&amp;gt;Read the &amp;lt;a href=&amp;quot;http://sqlpsx.codeplex.com/discussions/400490#post994893&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
full discussion online&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To add a post to this discussion, reply to this email (&amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;)&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;To start a new discussion for this project, email &amp;lt;a href=&amp;quot;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;SQLPSX@discussions.codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&amp;lt;a href=&amp;quot;https://sqlpsx.codeplex.com/subscriptions/thread/project/edit&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;
unsubscribe or change your settings&amp;lt;/a&amp;gt; on codePlex.com.&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&amp;lt;a href=&amp;quot;http://codeplex.com&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;codeplex.com&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/blockquote&amp;gt;
&lt;hr /&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a href="http://powershellstation.com&amp;quot;&amp;gt;http://powershellstation.com&amp;lt;/a&amp;gt;" rel="nofollow"&gt;http://powershellstation.com"&gt;http://powershellstation.com&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>MikeShepard</author><pubDate>Thu, 31 Jan 2013 21:04:54 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131090454P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thanks alot Mike.  I forgot I needed to invoke System.DBNull.  All is working as expected.&lt;/p&gt;
&lt;/div&gt;</description><author>JimDorame</author><pubDate>Thu, 31 Jan 2013 20:59:00 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131085900P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I can help with passing null.&lt;/p&gt;
&lt;p&gt;Here's a test stored procedure:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;create procedure sp_testnull
@parm1 varchar(100)
as
select name from sys.databases
where @parm1 is null
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here's the code to call it (assuming you have a connection to the database which has this procedure in it in $c)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;invoke-storedprocedure -storedProcName sp_testnull -parameters @{parm1=[System.DBNull]::Value} -connection $c&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>MikeShepard</author><pubDate>Thu, 31 Jan 2013 20:52:55 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131085255P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I downloaded  the latest again and it is working now.  I'm not quite sure what happened as I did a compare between what I had and what was downloaded and I was unable to see any difference.  Oh well working now, just have to figure out how to pass a null as a value to a parameter, is-null funcition blowing up now.  Thank you again for your time.&lt;/p&gt;
&lt;/div&gt;</description><author>JimDorame</author><pubDate>Thu, 31 Jan 2013 20:41:50 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131084150P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I was not able to reproduce your results.  I downloaded the 2.3.2.1 release (the latest) and used the script you provided and got the appropriate results.&lt;/p&gt;
&lt;p&gt;Can you repost the script and specific error you're getting?&lt;/p&gt;
&lt;/div&gt;</description><author>MikeShepard</author><pubDate>Thu, 31 Jan 2013 20:23:15 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131082315P</guid></item><item><title>New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection</title><link>http://sqlpsx.codeplex.com/discussions/400490</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Just getting back to this and unfortunatly the posted fix did not work.  I made the suggested change and unfortunaly I'm still recieving the error&lt;br /&gt;
database : The variable '$database' cannot be retrieved because it has not been set.&lt;/p&gt;
&lt;p&gt;When I step through the code it executes this statement:&lt;br /&gt;
$conn = Get-Connection -conn $connection -server $server -database $database -user $user -password $password&lt;br /&gt;
and then throws the error.    One more thing that might help from the Invoke-StoredProcedure function this is how New-SQLCommand is called:&lt;/p&gt;
&lt;p&gt;$cmd=new-sqlcommand @PSBoundParameters&lt;/p&gt;
&lt;p&gt;This is the function that appears to be having an issue:&lt;br /&gt;
function New-SQLCommand{&lt;br /&gt;
param([Parameter(Position=0, Mandatory=$true)][Alias('storedProcName')][string]$sql,&lt;br /&gt;
      [Parameter(ParameterSetName=&amp;quot;SuppliedConnection&amp;quot;,Position=1, Mandatory=$false)][System.Data.SqlClient.SQLConnection]$connection,&lt;br /&gt;
      [Parameter(Position=2, Mandatory=$false)][hashtable]$parameters=@{},&lt;br /&gt;
      [Parameter(Position=3, Mandatory=$false)][int]$timeout=30,&lt;br /&gt;
      [Parameter(ParameterSetName=&amp;quot;AdHocConnection&amp;quot;,Position=4, Mandatory=$false)][string]$server,&lt;br /&gt;
      [Parameter(ParameterSetName=&amp;quot;AdHocConnection&amp;quot;,Position=5, Mandatory=$false)][string]$database,&lt;br /&gt;
      [Parameter(ParameterSetName=&amp;quot;AdHocConnection&amp;quot;,Position=6, Mandatory=$false)][string]$user,&lt;br /&gt;
      [Parameter(Position=7, Mandatory=$false)][string]$password,&lt;br /&gt;
      [Parameter(Position=8, Mandatory=$false)][System.Data.SqlClient.SqlTransaction]$transaction=$null,&lt;br /&gt;
	  [Parameter(Position=9, Mandatory=$false)][hashtable]$outparameters=@{})&lt;/p&gt;
&lt;h1&gt;$dbconn=Get-Connection -conn $connection -server $server -database $database -user $user -password $password&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;$conn = Get-Connection -conn $connection -server $server -database $database -user $user -password $password

$close=($conn.State -eq [System.Data.ConnectionState]'Closed')
if ($close) {
    $conn.Open()
}   
$cmd=new-object system.Data.SqlClient.SqlCommand($sql,$conn)
$cmd.CommandTimeout=$timeout
foreach($p in $parameters.Keys){
    $parm=$cmd.Parameters.AddWithValue(&amp;quot;@$p&amp;quot;,$parameters[$p])
    if (Is-NULL $parameters[$p]){
       $parm.Value=[DBNull]::Value
    }
}
put-outputparameters $cmd $outparameters

if ($transaction -is [System.Data.SqlClient.SqlTransaction]){
$cmd.Transaction = $transaction
}
return $cmd&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>JimDorame</author><pubDate>Thu, 31 Jan 2013 19:52:03 GMT</pubDate><guid isPermaLink="false">New Post: Invoke-Storedprocedure/Invoke-SQL Issue when passing a connection 20130131075203P</guid></item><item><title>New Post: When will we see a new release of SQLPSX?</title><link>http://sqlpsx.codeplex.com/discussions/429872</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I glad you find SQLPSX useful.&lt;/p&gt;
&lt;p&gt;I agreed, we've been unable to put a release together for nearly two years. Personally I'd to like spend more time on SQLPSX, however I've pulled into other outside work activities, mostly running six IT Pro Camps a year (see
&lt;a href="http://itprocamp.com/" target="_blank"&gt;ITProCamp.com&lt;/a&gt;). The only opportunity I have to work SQLPSX is outside work and that time is less than it had been a couple of years ago.&lt;/p&gt;
&lt;p&gt;We've added a few developers to the SQLPSX project recently and if you're interested I can add you as developer. Let me know.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;--Chad Miller&lt;/p&gt;
&lt;/div&gt;</description><author>cmille19</author><pubDate>Sat, 26 Jan 2013 00:06:55 GMT</pubDate><guid isPermaLink="false">New Post: When will we see a new release of SQLPSX? 20130126120655A</guid></item><item><title>New Post: When will we see a new release of SQLPSX?</title><link>http://sqlpsx.codeplex.com/discussions/429872</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First, I want to say that we love SQLPSX and use it extensively with our PS scripts. We do database development for a large medical software company, and SQLPSX has saved us a lot of time writing common PS/SQL functions.&lt;/p&gt;
&lt;p&gt;Unless I'm looking in the wrong place, it's been over a year and a half since we've seen a new release of SQLPSX. And as I scan the discussion forum, I see responses such as, &amp;quot;That's fixed in the next release&amp;quot;, but I'm not sure when that release
 will be available.&lt;/p&gt;
&lt;p&gt;Also, I see many discussion threads where a user has a problem, and they are advised to modify the SQLPSX code themselves. This concerns me because I would expect there to be some sort of regular (e.g., daily, weekly) build/deploy process where SQLPSX fixes
 can be developed, tested, built, and delivered to users.&lt;/p&gt;
&lt;p&gt;If the SQLPSX team does not have the time to develop and deliver fixes to users, then maybe it would be useful to provide a mechanism for some of us developers in the field to contribute changes that get automatically tested and included with the next build?
 Something to consider.&lt;/p&gt;
&lt;p&gt;I'm not trying to be negative or point blame at anyone -- I'm sure the SQLPSX development team has other responsibilities and is very busy. I just want to make sure that the SQLPSX framework is given the attention it deserves and lives on well into the future.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;/div&gt;</description><author>ruthst00</author><pubDate>Thu, 17 Jan 2013 08:56:56 GMT</pubDate><guid isPermaLink="false">New Post: When will we see a new release of SQLPSX? 20130117085656A</guid></item></channel></rss>