Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflycons committed Sep 23, 2018
1 parent f52b756 commit 36015fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Firefly.InvokeSqlExecute.PowerShell/InvokeSqlExecuteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@
/// </summary>
/// <example>
/// <para>This is an example of calling Invoke-Sqlcmd to execute a simple query, similar to specifying sqlcmd with the -Q and -S options:</para>
/// <code>Invoke-SqlExecute -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance"</code>
/// <code>PS C:\> Invoke-SqlExecute -Query "SELECT GETDATE() AS TimeOfQuery" -ServerInstance "MyComputer\MyInstance"</code>
/// <para>This is an example of calling Invoke-Sqlcmd to execute a simple query, similar to specifying sqlcmd with the -Q and -S options:</para>
/// </example>
/// <example>
/// <para>This is an example of calling Invoke-Sqlcmd to execute a simple query, using the provider context for the connection:</para>
/// <code>PS SQLSERVER:\SQL\MyComputer\MyInstance> Invoke-SqlExecute -Query "SELECT @@SERVERNAME AS ServerName"</code>
/// <para>This is an example of calling Invoke-Sqlcmd to execute a simple query, using the provider context for the connection:</para>
/// </example>
/// <seealso cref="T:System.Management.Automation.PSCmdlet" />
/// <seealso cref="T:Firefly.InvokeSqlExecute.IInvokeSqlExecuteArguments" />
Expand All @@ -79,7 +85,7 @@ public InvokeSqlExecuteCommand()

/// <summary>
/// Gets or sets the abort on error.
/// <para type="description">Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell ERRORLEVEL variable if this cmdlet encounters an error.</para>
/// <para type="description">Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell LASTEXITCODE variable if this cmdlet encounters an error.</para>
/// </summary>
/// <value>
/// The abort on error.
Expand Down Expand Up @@ -452,7 +458,7 @@ public InvokeSqlExecuteCommand()
/// </para>
/// <para type="description">- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}</para>
/// <para type="description">- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types</para>
/// <para type="description">- string[]: e.g. @("VAR1=value1", "VAR2=Value 2")</para>
/// <para type="description">- string array: e.g. @("VAR1=value1", "VAR2=Value 2")</para>
/// </summary>
/// <value>
/// The variable.
Expand Down
15 changes: 12 additions & 3 deletions docs/en-US/Invoke-SqlExecute.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ Additionally, you can capture this output by providing a script block that will

### EXAMPLE 1
```
Invoke-SqlExecute -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance"
PS C:\> Invoke-SqlExecute -Query "SELECT GETDATE() AS TimeOfQuery" -ServerInstance "MyComputer\MyInstance"
```

This is an example of calling Invoke-Sqlcmd to execute a simple query, similar to specifying sqlcmd with the -Q and -S options:

### EXAMPLE 2
```
PS SQLSERVER:\SQL\MyComputer\MyInstance> Invoke-SqlExecute -Query "SELECT @@SERVERNAME AS ServerName"
```

This is an example of calling Invoke-Sqlcmd to execute a simple query, using the provider context for the connection:

## PARAMETERS

### -AbortOnError
Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell ERRORLEVEL variable if this cmdlet encounters an error.
Indicates that this cmdlet stops the SQL Server command and returns an error level to the Windows PowerShell LASTEXITCODE variable if this cmdlet encounters an error.

```yaml
Type: SwitchParameter
Expand Down Expand Up @@ -524,7 +533,7 @@ Various data types may be used for the type of this input:
- IDictionary: e.g. a PowerShell hashtable @{ VAR1 = 'Value1'; VAR2 = 'Value 2'}
- string: e.g. "VAR1=value1;VAR2='Value 2'". Note, does not handle semicolons or equals as part of variable's value -use one of the other types
- string\[\]: e.g. @("VAR1=value1", "VAR2=Value 2")
- string array: e.g. @("VAR1=value1", "VAR2=Value 2")
```yaml
Type: Object
Expand Down

0 comments on commit 36015fd

Please sign in to comment.