Private void CreateConnectionFromString() The following code creates a connection to the Microsoft SQL Server database file: If connection parameters ( DataConnectionParametersBase descendant) specific to the selected database do not exist or you wish to build a new connection string, use a CustomStringConnectionParameters object. You can handle the SqlDataSource.ConfigureDataConnection event to modify parameters at runtime. AuthorizationType = MsSqlAuthorizationType.Windows}ĭataSource = New SqlDataSource(connectionParameters) Private Sub CreateConnectionFromParameters()ĭim connectionParameters As New MsSqlConnectionParameters() With MsSqlConnectionParameters connectionParameters = new MsSqlConnectionParameters()ĪuthorizationType = MsSqlAuthorizationType.WindowsĭataSource = new SqlDataSource(connectionParameters) Private void CreateConnectionFromParameters()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |