Not knowing your specific .dbc file and product configuration; this is difficult to fix on this site without publicly sharing infomation.
Please contact product support and create a service request to resolve the issue.
Did you check the VM Match Condition for all your libraries? Perhaps the problem is with one of those.
Make sure that whatever field you are using for "Part Number" is of datatype "text".
We had ours set to "Number" and got the same error. I changed it to "text" in all the database tables. That solved the problem you encountered, and the replace function now works by bringing up a window with a table-like object in it from which I can select a replacement part by double-clicking. The contents of the table are defined in the Settings dialog > Query results format. It is in the form:
$(Part Number) $(Part Label) $(whatever other field you want to inlcude in the query results)
You can change that part around however you want. You also have to have the VM Match Condition for each table set in the DxDatabook configuration (available from the Settings dialog, the button with the magnifying glass and pencil). We set ours to match ('=") on the PCB Footprint and Partition fields in our database. The query searches in your DxDatabook database, not your library
There is a new error later in the process. Same error message as before. It comes when executing the "Create Variant/Function Schematics" button. The error message is repeated for every database table. After hitting "OK" for all of them the Variant gets applied to the schematic correctly. It also flows down through all the other tools - PCB, Fablink, Drawing Editor, without any problem. I'm not sure why it's there and why everything seems to work in spite of the error . . . (cue the programmer from Mentor to speak up and explain this)
Thanks for your suggestion, that was exactly the issue we were having with the Variant Manager, we are still doing some functional tests but so far is working.
I also just took note that the value of "Part Label" is changed when the variant is applied. (in the case of replacing a part) It adopts the same value as Part Number. To me this is unexpected behavior. I do not know if it is related to the ODBC error. I have a message in to our Mentor AE to see if he knows someone at Mentor that knows how the queries are constructed, and if there is any way we can modify them.
I suspect the errors are due to the query parameters not matching the database structure. Not surprising, as it would be very difficult to contemplate every possible database scenario when building a canned query. I think it would be simple to fix the problem if we could build the queries ourselves, making sure they match our databases.
From Ed Murphy at Mentor:
In DxDB, right-click and choose Configure > Edit Configuration
In the Configuration dialog, click the Update All button.
Click OK and then right-click in DxDataBook and choose Configure > Save.
Close DxDesigner and reopen.
I did this, and it worked. No more errors.
Thanks to Ed and anyone else at Mentor who contributed.