I have written a custom OLEDB provider using ATL for our own data.
The metadata (list of tables and columns) as well as the data seem to be
coming through when this provider is used with Excel 2007.
However, when I use a third party reporting product, I am running into an
error when metadata fetch request is made. The error is "Non-nullable column
cannot be updated to Null."
The column that I am returning is indicated as containing nulls:
memset(&col, 0, sizeof(ATLCOLUMNINFO));
col.dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH | DBCOLUMNFLAGS_ISNULLABLE;
...
A little background on the reporting product. It has two modes to build
query - designable mode and advanced mode. In the designable mode, you use
drag-n-drop to build the query. In the advanced mode, you just type the SQL
statement.
The provider is working as expected in the advance mode. The data is being
fetched for the specified SQL query.
The error happens when I am in the design mode and a request to get the list
of tables is made.
I would appreciate it someone can suggest me what is it that I am missing.
Thank you in advance for your help.
Regards,
Peter