I inherited a VB6 application that was using data that resided on a SQL 2000 database that is being upgraded to SQL 2008. This app is using a stored procedure that contains a union query (among multiple tables) to return an ADO recordset. This recordset is also being updated by the VB6 app (using the rs.Update function). After some research, it seems that this is not allowed in SQL 2008 as union queries are not updateable. So I created a second stored procedure that calls the existing stored procedcure (with the union) and places the result in a temp table. The records in the temp table are then returned to the application. The code that contains the rs.Update doesn't throw an error now, however it doesn't update the database. I'm assuming that it is trying to update the temporary table and thus never updating the permanent tables in the database. The only way I can think to get around this is to take the existing stored procedure with the union and break it down into multiple procedures with each new procedure referencing only one table. I would prefer not to do this, unless it's the only option. Does anybody have a differenct solution to this problem? TIA
↧