Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update ADO recordsets
Message
From
19/01/1999 09:21:41
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00176986
Message ID:
00177548
Views:
32
I Don't understand the stuff about the hierarchical recordsets.

We use ADO because our program has to work over the internet and has to work
with different databases.


>Not if you use hierarchical recordsets.. Also, ODBC is geared toward relational data. OLE-DB can work with anything. Also, there are a host of things you can do with ADO recordset that you can't do with a VFP Cursor. It's really not that much extra work.
>
>I suppose it begs the question, why are you using ADO??
>
>
>>Thanks for your reply
>>
>>I was wondering, bacause when i did the same with a remote view
>>(form a sqlserver databases) it was working.
>>
>>Now i have to run 2 queries.
>>
>>Kind regards
>>
>>Jan Dorresteijn
>>
>>
>>
>>
>>
>>>You will find the same behavior with SQL, FWIW. Basically, you are creating a new cursor, which is based on two tables. As such, when you attempt an update, ADO, and more specfically, the OLE-DB Provider for ODBC, does not know what is to be updated. Esstentially, it gets confused.
>>>
>>>You have two choices. One alternative is to use a hierachical recordset in which you have nested tables. The other alternative is to use multiple recordsets. If you navigate to a specific record in the one recordset, you can then set the filter property or use the find method to locate related records for display. If there could be more than one match, I would suggest using the Filter Property.
>>>
>>>HTH..
>>>
>>>
>>>
>>>
>>>
>>>>I can select a recordset with a WHERE CLAUSE based on 2 databases
>>>>and update records. It works when i select the fields
>>>>from only 1 database Example project.* See Example
>>>>
>>>>IF i make the same selection with 2 databases project.*, rela.*
>>>>I can not update anymore.
>>>>
>>>>I only need the second database for display.
>>>>Does someone has a solution
>>>>
>>>>Kind regards
>>>>
>>>>Jan Dorresteijn
>>>>
>>>>
>>>>Example
>>>>lSql = "Select project.* from project,rela ;
>>>> WHERE prtype=type and prcode=rcode and ;
>>>> rela.zbedr LIKE 'BAS%' "
>>>>
>>>>*** This works fine
>>>>*** If i select more fields it is going wrong
>>>>*** Project.*, rela.*
>>>>*** Project.* rela.bedr AS bedr
>>>>
>>>>
>>>>Recordset.open(lSql,lConnection,1,2)
>>>>Recordset.movefirst
>>>>
>>>>? RecordSet.fields('Prcode').value
>>>>? RecordSet.fields('pkomschr').value
>>>>? RecordSet.fields('pzcode').value
>>>>
>>>>*RecordSet.fields('pzcode').value = "TEST"
>>>>recordset.update
Previous
Reply
Map
View

Click here to load this message in the networking platform