devxlogo

August 25, 2004

Using std::vectors Efficiently

Whenever possible, use C++ arrays. Array indexing has an order of magnitude of O(1). This means that it is very fast. However, if the size of the array is not

Cache Your Repeated Calls to the Database

Use this code to cache your repeated calls to the database: Dim mLookup As Scripting.DictionaryDim cn As ADODB.ConnectionEnum enumLookup ltCustomers ltVendors ltSalespeopleEnd EnumPrivate Sub Form_Load() Dim rstest As ADODB.Recordset Set

How To Add New Rows to a Filtered DataView

Suppose you have a “view” into a set of records. One column of the data contains a country ID, (such as “US”): DataView myDataView = new DataView(myTable); myDataView.RowFilter = “country