> Thanks Mark
>
[quoted text clipped - 6 lines]
> Set recClientImport.ActiveConnection = mobjConnection
> recClientImport.UpdateBatch
The cursor and lock type specifiers at this point are of no consequence,
they are important to the original recordset from which the XML was
generated,
You should look at the XML to make sure the recordset is updatable. The "
<s:ElementType name='row' " node must contain the " rs:updatable='true' "
attribute, and each " <s:AttributeType " node for a field to be updated must
include the " rs:writeunknown='true' " attribute. It also helps if the
latter includes the "BaseCatalog" and "BaseTable" attributes, those are a
very strong assurance that it knows what it's supposed to be updating.
For this persistant schema to be generated, each row must be uniquely
identified, typically by an identity column, and the SQL statement that was
used to retrieve the data must have been inherently updatable (i.e., not a
UNION, not an aggregate, not derived fields, etc.)
Before calling UpdateBatch, save the recordset to another stream or temp
file to examine it. For each row that was updated it should wrap the
<z:row> node in an <rs:update> node.
Example: data that has not been updated since it was read from the db looks
like this:
<rs:data>
<z:row ClassID='15' InstID='1' Event='Class_Initialize'/>
<z:row ClassID='19' InstID='2' Event='Class_Initialize'/>
<z:row ClassID='25' InstID='3' Event='Class_Initialize'/>
</rs:data>
If the Event field in the second row in the sample above, was altered by
adding 3 'x' characters to the existing value, it looks like this:
<rs:data>
<z:row ClassID='15' InstID='1' Event='Class_Initialize'/>
<rs:update>
<rs:original>
<z:row ClassID='19' InstID='2' Event='Class_Initialize'/>
</rs:original>
<z:row Event='Class_Initializexxx'/>
</rs:update>
<z:row ClassID='25' InstID='3' Event='Class_Initialize'/>
</rs:data>
If updates to the recordset are not generating this construction, it's
because the persistance provider does not believe the data can be
batch-updated. It is possible to fixup the XML on the fly, but yoy really
have to be on your game to get away with that, as when it's all said and
done, it's got to be legal to the server, or it's worthless.
-Mark
> Sly