' connect to personal geodatabase called C:\Temp\pGDB_Scratch.mdb Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Temp\pGDB_Scratch.mdb" ' Create the connection. Dim oleDbConnection As OleDb.OleDbConnection = New OleDb.OleDbConnection() oleDbConnection.ConnectionString = connectionString ' Open the connection and create a reader. oleDbConnection.Open() ' Create the command to select all fields from a FeatureClass called CompassPoints Dim sqlQuery As String = "SELECT * FROM CompassPoints" Dim oleDbCommand As OleDb.OleDbCommand = New OleDb.OleDbCommand(sqlQuery, oleDbConnection) Dim oleDbDataReader As OleDb.OleDbDataReader = oleDbCommand.ExecuteReader() ' Display data in debug window Do While oleDbDataReader.Read() Debug.Print(oleDbDataReader("ID").ToString()) Debug.Print(oleDbDataReader("Angle").ToString()) Loop
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.