Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems Updating VFP Table with VB
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00283937
Message ID:
00284068
Vues:
15
Ed, You said 'unless I specify the upadte method in DAO'. How would I do that. I looked for a property to set. I fopund the Updatable property, but it is read only. I did a watch on it for both the Database & the Recdordset. Database = True: RecSet = False.

That makes sense, since I Specifically told VB to open the Database with ReadOnly off. I htne looked to see if I could do that when Creating the Recordset. In VB Help, I see where I can set to Read Only when I create it, but not Read/Write. When you say to speicy the Update Method in DAO, you mean somewhere outside of my code, like an Options menu for DAO?

It's been a while snse using VB. I have'nt ever use ADO, not sure how close or different it is from DAO, or where I would start with it. Any ideas there would be appreciated also.

Thanks

>Stephen,
>Unless you specify the update method in DAO, it defaults to a read-only recordset, resulting in an error if you try to update.
>
>Also, is this a legacy app that you can't migrate to ADO code?
>
>>Bare with me, guys. I am new to Universal Thread. I think I posted this to the VFP FOrum. Should be in VB. I hope I got it right this time.
>>
>>I have opened a VFP 5.0 Table with VB 5.0. It opens up & I can see all that data. However, if I try an update type command, i.e. Update, AddNew, Edit, etc. I get Runtime Error 3027 "Can't Update. Database or object is read-only".
>>
>>I know that this Directory & all Tables in it are NOT readonly. I have tried other .DBFs & get the same result. Is there some secret to this? This is a local table, not on a Network drive.
>>
>>I can Update the Table using the Data Control, but not DAO code. I am not on a network. Table is local. My Table Open code is:
>>
>>Dim dbAPSS As Database
>>Dim rsCust As Recordset
>>
>>Set dbAPSS = DBEngine.Workspaces(0).OpenDatabase(App.Path, False, False, _
>>"FoxPro 3.0")
>>
>>Set rsCust = dbAPSS.OpenRecordset("Cust2", dbOpenTable)
>>
>>My probelm, still is when I use the Update method, I get an error message that Table it read only.
>>
>>Any thoughts?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform