-
Notifications
You must be signed in to change notification settings - Fork 0
Connect SQLite
Proxx edited this page May 8, 2015
·
23 revisions
Connect-SQLite
Connect to SQLite Database file
Connect-SQLite [[-Database] <Object>] [-Open] [<CommonParameters>]
Create a System.Data.SQLite.SQLiteConnection Object to the SQLite Database
-Database <Object> Required? false Position? 1 Default value $($MyInvocation.PSScriptRoot) + "\database.db" Accept pipeline input? false Accept wildcard characters? false -Open [<SwitchParameter>] Required? false Position? named Default value False Accept pipeline input? false Accept wildcard characters? false <CommonParameters> This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
None. You cannot pipe objects to Connect-SQLite
<System.Data.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)RELATED LINKS http://www.proxx.nl/