Skip to content
Marco van Gaal edited this page Aug 5, 2015 · 11 revisions

.NAME

Invoke-SQLiteTable

.SYNOPSIS

Bulk insert to SQLite Database

.PARAMETERS

 -Connection <SQLiteConnection>
     
     Required?                    true
     Position?                    1
     Default value                
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -InputObject <DataTable>
     
     Required?                    true
     Position?                    2
     Default value                
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -Name <String>
     
     Required?                    false
     Position?                    3
     Default value                $InputObject.TableName
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -Update <String>
     
     Required?                    false
     Position?                    4
     Default value                
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -Replace [<SwitchParameter>]
     
     Required?                    false
     Position?                    named
     Default value                False
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -Progress [<SwitchParameter>]
     
     Required?                    false
     Position?                    named
     Default value                False
     Accept pipeline input?       false
     Accept wildcard characters?  false
     
 
 -Whatif [<SwitchParameter>]
     
     Required?                    false
     Position?                    named
     Default value                False
     Accept pipeline input?       false
     Accept wildcard characters?  false

.INPUTS

None. You cannot pipe objects to Invoke-SQLiteTable.

.OUTPUTS

Work in progress (maybe count of updates/inserts)

.NOTES

 Author: Proxx
 Web:    www.Proxx.nl 
 Date:    10-06-2015

.EXAMPLES

 -------------------------- EXAMPLE 1 --------------------------
 
 PS C:\>Invoke-SQLiteTable [-conn] <SQLiteConnection> [-InputObject] <DataTable> [[-Name] <String>]
 
 
 
 Inserts or ignores records to database table.
 
 
 
 
 
 -------------------------- EXAMPLE 2 --------------------------
 
 PS C:\>Invoke-SQLiteTable [-conn] <SQLiteConnection> [-InputObject] <DataTable> [[-Name] <String>] [[-Update] <Column>]
 
 
 
 Inserts or ignores records then updates row where -Update <Column> = Row.Value
 
 
 
 
 
 -------------------------- EXAMPLE 3 --------------------------
 
 PS C:\>Invoke-SQLiteTable [-conn] <SQLiteConnection> [-InputObject] <DataTable> [[-Name] <String>] [-Replace]
 
 
 
 Inserts records or replaces row.
 
 
 
 
 
 -------------------------- EXAMPLE 4 --------------------------
 
 PS C:\>Invoke-SQLiteTable [-conn] <SQLiteConnection> [-InputObject] <DataTable> [[-Name] <String>] [-WhatIf]
 
 
 
 Shows import query, runs the import but rollsback the changes so no changes are made to database. (debug)

.RELATED LINKS

http://www.proxx.nl/Wiki/Invoke-SQLiteTable/

Clone this wiki locally