Unanswered: ADO - Editing a Paradox record in Visual Basic
I am in desperate need of help. I am using Visual Basic 6. I am trying to "EDIT" a record in a Paradox 5.x table. I have no problem adding, deleting. My problem is trying to edit in a table where there is an AUTONUMBER field.
I query the table for the record, I update the field I want...No problem. When I pull that record back up, the AUTONUMBER field has changed. It is not the same when I started the edit.
I linked the tables in access and try the same edit. As soon as I change the field and click TAB to save the record, all the fields say: #DELETED. When I close the table and reopen it, the record apprears with the modified field, and the AUTONUMBER field has changed. I need to modify the record without changing the AUTONUMBER field.
I have also noticed one thing. This problem does not happen on one computer. The computer contains the following (3) files when I try to modify the record that are loaded in memory (idapi32.dll, idpdx32.dll, and idr200009.dll) all Borland / Inprise library files. Can someone please help, this problem has been bothering me for over 2 weeks. I know if I was using a Borland Programming environment, I could do this no problem, but the whole project was started & written in VB and I need to get it to work in this environment.
Re: ADO - Editing a Paradox record in Visual Basic
Please write the code that you are using to update the table. Are you doing so using a select statement or the built in update methods of the ADO recordset? As certain methods do a DELETE and then an INSERT when you call update. Try sending an UPDATE select statement through the connection object instead i.e.
cn.Execute "UPDATE TABLE1 SET Field1=2 FROM TABLE1", adExecuteNoRecords
Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!
Or try our Ask An Expert service to answer any of your questions!