< Back
Connect-SdfFile
Post
NAME Connect-SdfFile
SYNOPSIS
Connect to a SQL Server CE file.
SYNTAX
Connect-SdfFile [-Path] <FileInfo> [-MaxDBSize <Int32>] [-TimeOut <Int32>] [-SecurePassword] [-UnsecurePassword
<String>] [<CommonParameters>]
DESCRIPTION
Creates a connection to a SQL Server CE file (.sdf file). Use this cmdlet prior to running InvokeSdfCmd
PARAMETERS
-Path <FileInfo>
A valid SQL Server CE file (.sdf file)
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MaxDBSize <Int32>
Max database size can be set. Initial value is set to 4091 which is max size
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-TimeOut <Int32>
Timeout can be set. Set to 10 default
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SecurePassword [<SwitchParameter>]
This switch is used for prompting for a password to use when connecting to the sdf file.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-UnsecurePassword <String>
If you don't care about security otr you want to run this automated, use this option to pass a password for
the sdf connection
Required? false
Position? named
Default value None
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Connect-SdfFile -Path C:\\Temp\\MyDatabase.sdf
Establishes a connection to MyDatabase. The connection persists until the console is closed or a new connection is
established.
-------------------------- Example 2 --------------------------
PS C:\\> Connect-SdfFile -Path C:\\Temp\\MyDatabase.sdf -SecurePassword
Type your password: * * **
RELATED LINKS
SYNOPSIS
Connect to a SQL Server CE file.
SYNTAX
Connect-SdfFile [-Path] <FileInfo> [-MaxDBSize <Int32>] [-TimeOut <Int32>] [-SecurePassword] [-UnsecurePassword
<String>] [<CommonParameters>]
DESCRIPTION
Creates a connection to a SQL Server CE file (.sdf file). Use this cmdlet prior to running InvokeSdfCmd
PARAMETERS
-Path <FileInfo>
A valid SQL Server CE file (.sdf file)
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MaxDBSize <Int32>
Max database size can be set. Initial value is set to 4091 which is max size
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-TimeOut <Int32>
Timeout can be set. Set to 10 default
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SecurePassword [<SwitchParameter>]
This switch is used for prompting for a password to use when connecting to the sdf file.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-UnsecurePassword <String>
If you don't care about security otr you want to run this automated, use this option to pass a password for
the sdf connection
Required? false
Position? named
Default value None
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Connect-SdfFile -Path C:\\Temp\\MyDatabase.sdf
Establishes a connection to MyDatabase. The connection persists until the console is closed or a new connection is
established.
-------------------------- Example 2 --------------------------
PS C:\\> Connect-SdfFile -Path C:\\Temp\\MyDatabase.sdf -SecurePassword
Type your password: * * **
RELATED LINKS