Error when using ADO to insert blob into SQL Server linked table (1 Viewer)

harmankardon

Registered User.
Local time
Today, 10:15
Joined
Aug 8, 2011
Messages
71
Use the WITH VIEW_METADATA option when creating the view. This should fix that part of the issue.

Well this turned out to be quite the gem. Using SQL Server Profiler I can see that the VIEW_METADATA attribute solves my problem with the SQLOLEDB driver. If I alter the view in question to have the VIEW_METADATA attribute, my ADO calls using the SQLOLEDB driver now access the view instead of going directly to the underlying table.

Interestingly, the VIEW_METADATA attribute seems to have no impact on the legacy SQL Server ODBC driver ("Driver=SQL Server" in the connection string), it always sees the view and not the underlying table. Perhaps this makes sense because the OLE DB driver is a more generic data access driver whereas the SQL Server ODBC driver is specifically for SQL Server.

Thanks again for this sonic8!
 

Users who are viewing this thread

Top Bottom