< Back

New-DataConnection

Tue Jan 14, 2020 1:26 am

NAME New-DataConnection



SYNOPSIS

Opens a database connection.





SYNTAX

New-DataConnection [-FileOrName] <string> [<CommonParameters>]



New-DataConnection [-ProviderName] <string> [-ConnectionString] <string> [<CommonParameters>]





DESCRIPTION

The New-DataConnection cmdlet opens a database connection.





PARAMETERS

-FileOrName <string>

A database file name or a connection string name.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ProviderName <string>

A database provider name.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ConnectionString <string>

A connection string.



Required? true

Position? 1

Default value

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



OUTPUTS

System.Data.Common.DbConnection







RELATED LINKS