PDA

Click to See Complete Forum and Search --> : AddNew problem-HELP!!!


qlong
Oct 3rd, 2000, 02:21 PM
This has been plaguing me for weeks. I am trying to use the AddNew method of a disconnected ADO recordset in a form to add new records to an Access 2000 database. I'm using an adUseClient cursor location, OpenDynamic cursor type, and optimistic locking. Also, I have 2 DataCombo controls on my form, and they work just fine when I navigate through the recordset. (I've got 2 ADO Data Controls on the form as well, so I've set the appropriate properties of the DataCombo controls to the disconnected recordset as well as to the respective ADODC's). So here's my prob:

When I call the recordset's AddNew method, I always get an error. Always. I can save changes by using the Update method, but the AddNew method just will not work! This morning, I even installed MDAC 2.5 and Service Pack 4 for Visual Studio 6.0 (which I'm using, obviously). I thought this would fix the prob, but it didn't. I'm at my wit's end and I have no idea what to do from here.

Has anyone else had this problem? My error reads something like "No columns will be updated...". It's just weird that the Update method will work but not the AddNew.

Also, I have 2 other forms with disconnected recordsets and when I use the AddNew method on those forms it works fine. However, I don't have DataCombo's on those forms so I'm thinking this is the problem. Or maybe it's got something to do with CursorType, CursorLocation, etc.

CAN ANYONE HELP ME?

Thanks!!!

qlong

Oct 4th, 2000, 02:13 AM
Hi, i may not be able to provide a complete solution, but here is what i feel. I think you should try and use locktype as batchoptimistic and a batchupdate. why dont you try a recordset of type keyset. This may work just fine. Well i am sorry, if in trying to help you, i had confused you. I would very much like to know the solution please. could you just mail to gantibabu@yahoo.com when you solve this. i will be waiting...with regards...vijay

Dragev
Oct 4th, 2000, 02:36 AM
Does VB6 support Access 2000?
I always export it to "previous" version....

D

Oct 5th, 2000, 07:36 AM
Hoi,

Check the properties of the ComboBox involved.
Is EOFACTION changed to 2=adDoAddNew ???


GUUS

Oct 6th, 2000, 12:08 AM
Hi Dragev, atlast i am happy that i am not alone. Yes even i had problems with Access 2000 databases in VB6. I had problems when i imported tables from earlier versions or when i converted databases from earlier versions, i had to again convert them to previous versions so as to work in VB6. But, i think ADOs support them but still i had problems with the provider. The error i was getting was "Unrecognized Database Format" and that was haunting me for weeks together. One more thing i observed is there are no problems if an entirely new database is created in Access 2000. But if u import a table from earlier version then again u r greeted with "U..D..F". Hope, to get a solution for this soon. Please, will u keep me informed. I will be waiting at gantibabu@yahoo.com. all the best...vijay