I am attempting to retrieve one field of one row in an access database. The current setup i have takes around 100 ms. Is there a faster way for a single field?
Public Function GetEntityConfig(ByVal pintID As Integer) As aadXML.XMLDoc
Dim objRtn As New aadXML.XMLDoc, myreader As OleDbDataReader
Dim Query As New OleDbCommand("Select e_config from entity where e_id = " & pintID, CurrentActiveConnectionToDB)
If CurrentActiveConnectionToDB.State = False Then
CurrentActiveConnectionToDB.Open()
End If
myreader = Query.ExecuteReader()
myreader.Read()
objRtn.LoadXML(myreader.Item("e_config"))
myreader.Close()
GetEntityConfig = objRtn
CurrentActiveConnectionToDB.Close()
End Function