-
Notifications
You must be signed in to change notification settings - Fork 0
Connect SQLite
Marco van Gaal edited this page May 8, 2015
·
23 revisions
Connect-SQLite
Connect to SQLite Database file
-Database
Required? false Position? 1 Default value $($MyInvocation.PSScriptRoot) + "\database.db" Accept pipeline input? false Accept wildcard characters? false-Open []
Required? false Position? named Default value False Accept pipeline input? false Accept wildcard characters? false
None. You cannot pipe objects to Connect-SQLite
<SQLiteConnection>
-------------------------- EXAMPLE 1 -------------------------- C:\PS>$conn = Connect-SQLite -Database <FilePath> -------------------------- EXAMPLE 2 -------------------------- C:\PS>$conn = Connect-SQLite -Database <FilePath> -Open -------------------------- EXAMPLE 3 -------------------------- C:\PS>$conn = Connect-SQLite -Open When run in Script the database file is located in $PSscriptRoot with the name: database.db But if you run this from Console the database file is located in $pwd location -------------------------- EXAMPLE 4 -------------------------- C:\PS>$conn = Connect-SQLite -Database :MEMORY: (creates a SQLite database in memory)