September 2, 2000

An error that must be trapped

When you use JIT activation in particular there is a special situation that you have to be prepared for. While discussing that issue, I will also show a trap when using “With“; how to force an access violation; an obscure detail of activation and more.VB.NETSorry, IA SOLUTIONThe error you will

Determine the RecordCount of a forward-only Recordset

When working with a forward-only, read-only Recordset – that is, the default ADO Recordset – the RecordCount property always returns -1. (This can also happen with other types of server-side cursors, depending on the specific OLEDB provider.) In general, you can determine how many records were returned only after visiting

Use aliased field names to avoid ambiguities in JOIN commands

Suppose you have two tables named Table1 and Table2 with one or more fields named the same way. Now, consider this query: rs.Open “SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id” In our example, both table1 and table2 share the same field name “field1”, but with different

Open a password-protected MDB database with ADO

The syntax for opening a password-protected Jet database might not be obvious. In fact, assigning the password to the Password property in the ConnectionString raises the following error: Run-time Error: 2147217843 (80040e4d)Cannot start your application. The workgroup information file is missing or _ openened exclusively by another user. Instead, you

Changing the current record using bookmarks

If you try to use a DataList and some labels or text boxes linked to an ADO Data control, and you click on some items in the list, you’ll notice that the data in the labels won’t change, because the current record isn’t changed. To have the code work correctly,

Read and write File ODBC data sources

A file DSN is nothing but a text file that contains all the parameters for an ODBC connection. To prove this, just go to the default directory that holds all File DSNs (this is the Program FilesCommon FilesODBCData Sources directory on Windows’s boot drive) and load any .dsn file into

All the Changes, All the Time: Part II

o briefly recap the situation I described in “All the Changes, All the Time: Part I“, my assignment was to capture all the changes being made in one database and, upon approval by an administrator, apply these changes to another copy of the database in production. In Part I, I