Die Datenquellen (Data Provider) des Microsoft .NET Frameworks für OLE DB erlauben Ihnen die Verwendung nativer OLE DB Datenquellen OLE DB wie etwa Microsoft.JET.OLEDB.4.0 durch COM interop, um den Datenzugriff zu ermöglichen.
IBM AS/400 OLE DB Provider:
1 2 3 4 5 6 7 8 9 10 11 |
' VB.NET Imports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=IBMDA400.DataSource.1;" & _ "Data source=myAS400DbName;" & _ "User Id=myUsername;" & _ "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() |
JET OLE DB Provider:
1 2 3 4 5 6 7 8 9 10 11 |
' VB.NET Imports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\myPath\myJet.mdb;" & _ "User ID=Admin;" & _ "Password=" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() |
Oracle OLE DB Provider:
1 2 3 4 5 6 7 8 9 10 11 |
' VB.NET Imports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=OraOLEDB.Oracle;" & _ "Data Source=MyOracleDB;" & _ "User ID=myUsername;" & _ "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() |
SQL Server OLE DB Provider:
1 2 3 4 5 6 7 8 9 10 11 12 |
' VB.NET Imports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=sqloledb;" & _ "Data Source=myServerName;" & _ "Initial Catalog=myDatabaseName;" & _ "User Id=myUsername;" & _ "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() |
Sybase ASE OLE DB Provider:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
' VB.NET Imports System.Data.OleDb ... Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=Sybase ASE OLE DB Provider;" & _ "Data Source=MyDataSourceName;" & _ "Server Name=MyServerName;" & _ "Database=MyDatabaseName;" & _ "User ID=myUsername;" & _ "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() |
Pingback: Datenbank-Anbindung mit .NET-Datenquellen (Data Provider) › Referenz der Connection Strings