ADO Shaped recordset not updating

ADO Shaped recordset not updating

Post by Chris O'Bri » Wed, 28 Mar 2001 04:59:30



I've created a shaped ADO recordset as follows:

rsRuleData.CursorLocation = adUseClient
rsRuleData.Open "SHAPE {Select Distinct RulesID, KeyID, TreeText,
VariableGroupLevelID from qryVariableGroupList where RulesID = 203}
AS Rules APPEND ({SELECT * FROM `qryVariableMapList_updateable`}  AS
Variables RELATE 'RulesID' TO 'RulesID','KeyID' TO 'VariableGroupID')
AS Variables", connADO, adOpenDynamic, adLockBatchOptimistic

Set rsVariables = rsRuleData("Variables").Value

the recordsets are disconnected by setting the activeconnection =
nothing for both rsRuleData and rsVariables.

After changes are made the activeconnection property is set back to
connADO and the .batchupdate method is invoked.  The rsRuleData
recoredset updates fine but the rsVariables recordset will not update
and gives me an error:

insufficient key column information for updating or refreshing

any ideas or help would be much appreciated!

Chris O'B

 
 
 

ADO Shaped recordset not updating

Post by Dan Holme » Thu, 29 Mar 2001 22:16:45



> I've created a shaped ADO recordset as follows:

> rsRuleData.CursorLocation = adUseClient
> rsRuleData.Open "SHAPE {Select Distinct RulesID, KeyID, TreeText,
> VariableGroupLevelID from qryVariableGroupList where RulesID = 203}
> AS Rules APPEND ({SELECT * FROM `qryVariableMapList_updateable`}  AS
> Variables RELATE 'RulesID' TO 'RulesID','KeyID' TO 'VariableGroupID')
> AS Variables", connADO, adOpenDynamic, adLockBatchOptimistic

> Set rsVariables = rsRuleData("Variables").Value

> the recordsets are disconnected by setting the activeconnection =
> nothing for both rsRuleData and rsVariables.

> After changes are made the activeconnection property is set back to
> connADO and the .batchupdate method is invoked.  The rsRuleData
> recoredset updates fine but the rsVariables recordset will not update
> and gives me an error:

> insufficient key column information for updating or refreshing

> any ideas or help would be much appreciated!

> Chris O'B

i think you will have to iterate through it and .batchupdate
each row.
--
-------------------
Dan Holmes
Integrated Visual Systems, Inc.
voice 704-847-3379
fax   704-847-4655

work -> http://www.ivsi.com
play -> http://www.geocities.com/heartland/hollow/3097

Insert Disclaimer:
Most of the time i think for myself, at least that is what
they tell me.

 
 
 

1. ADO Shaped Recordset not updating rows

Hi,

I'm a student working on a 3rd year project with VB/ADO.  I have created a
shaped hierarchical recordset based on two tables.  When I insert a new
record into a child recordset, I want to be able to update the row so it
pulls in the shaped information.

I have a Budget table, which has Allocations.  The allocation ado command is
an sql query which joins the Allocation table with the Staff table, so I can
get the staff name.  When I insert a new Allocation, my Grid control
displays the Allocation - but not the Staff info.  If I quit the app and
restart, the info is shown.

Please help! My assignment is due soon, I haven't done any ADO programming
before, and neither have my lecturers!

2. Force CP

3. Can I update a Shaped recordset with ADO ?

4. Urgent: The client and server codepages does not match

5. Bound controls not updating ADO with adodc.recordset.update command

6. How really secure is data in SQL Server

7. RecordSet.Update Updates DB but Not RecordSet

8. Informix Want Deliver

9. ADO Recordset not updating first time

10. ADO storedproc error: Updating not allowed on recordset

11. ADO Recordset does not update

12. HELP: ADO Not updating it's recordset