Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display a field from a Access database
Message
 
À
30/09/1999 15:35:54
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00270212
Message ID:
00271393
Vues:
33
>Eric,
>
>I created a standard exe project then I created a connection( ODBC to an Access database) in the dataenvironment of my main form. Then I created a command ( source is a table called DDA1 from an Access database). Then I drag couple of fields to my main form and I added a command button to advance to the next records :

>
>Then I added the following code to other command button :
>
>Private Sub cmdUpdate_Click()
> MsgBox deEUC.rscmDDA1.Fields("account_balance").Value
> Do While Not deEUC.rscmDDA1.EOF
>
> If deEUC.rscmDDA1.Fields("account_balance").Value > 50000 Then
> deEUC.rscmDDA1.Fields("positive_negative").Value = "Positive"
> End If
> deEUC.rscmDDA1.MoveNext
> Loop
>End Sub
>
>I run the form and I get the following error when I click on the cmdUpdate command button:
>
>"Run-time error '3251'
>The operation requested by the application is not supported by the provider"

I had reproduced the same things you have and ... I have the same problem you have! But, the answer is easy now. Open your data environment, select the command, open the properties and go to the advanced tab. In there change the Lock type property to something like "3-Optimistic".

Is it working now?

PS: Hey see the other thread I will start in a few minutes explaining a problem very similar to yours.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform