The "Insufficient base table information for updating or refreshing" error occurs when a SQL query has a semicolon on the end of the statement.
Example: "SELECT * FROM Orders WHERE OrderID = '1177';"
The cure is to remove the semicolon or set the CursorLocation to adUseServer. When a semicolon is removed from the SQL statement, ADO makes the following essential calls to obtain schema information.
1. calls IDBCreateCommandImpl::CreateCommand
2. calls ICommandImpl::SetCommandText with "SELECT * FROM <tablename>"
3. calls ICommandPrepare::Prepare
4. calls IColumnsInfo::GetColumnInfo
5. calls IDBSchemaRowsetImpl::GetRowset (obtains primary keys information forTableName='<tablename>')
When the semicolon is present, ADO does not make these calls, hence the error.
If anyone could explain this odd behavior, I'd welcome it.
-Jack