General information
Category:
Database DAO/RDO/ODBC/ADO
Mark,
Failure on the addnew method usually indicates either a read-only cursor, or the
open method hasn't been called yet. Make sure you set the locking type to Optimistic, Pessimistic, or the Batch modes. If you don't specify it, you'll get a read-only cursor and AddNew will generate an error.
HTH,
Ed
>For my sins I'm rewriting a POS application so that it works properly but I have the slight problem that the supplied database is an Access database and I don't have Access to modify it. I do have Visual FoxPro so I created a VFP database to match the Access one. All well and good. I'm using ADO since one of the requirements is scalability and the intention is that this may be using Oracle/Interbase/SQL Server/Advantage databases on other setups.
>
>The system works well when reading the data from the VFP or Access databases but it falls over with an ODBC error when trying to call the AddNew method of the record set.
>
>Now, over in the Visual FoxPro forum, John Peterson reccommends not using the recordset to update the database but the command object. So I have two questions. Firstly, is there an OLE DB Provider for Visual FoxPro rather than using the ODBC OLE DB Provider and secondly, how is the command object to be used?
>
>Now, before you all say go and buy a book on ADO and find out I ought to mention that, if you noticed the country flag at the top of this message, I live in Malta and books on ADO are not easy to come by here! That's why I'm asking the question to you guys and gals.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only