Solved

Please amend this code

Posted on 2002-07-27
7
213 Views
Last Modified: 2010-05-02
Hi,

In my project I use Access 2000 and Dataenvironment. in  the following code I want to change the value of the field “F1” to be = the variable "i" , but it gives me error.

the code:
DataEnvironment1.rsCom1.MoveFirst
DataEnvironment1. rsCom1!F1 = i

Here it gives me this error message:
“The operation requested by the application is not supported by the provider “

Note:
I use these sentences instead , but no way
DataEnvironment1. rsCom1(F1) = i
Or
DataEnvironment1. rsCom1.Fields(F1).Value = i

Please I need your help to amend the code

Thanx

0
Comment
Question by:ray14
7 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 7182681
change to either:

DataEnvironment1. rsCom1("F1") = i
Or
DataEnvironment1. rsCom1.Fields("F1").Value = i

since F1 is the NAME of the field, it must be passed as a string value.

Arthur Wood
0
 

Author Comment

by:ray14
ID: 7182693
Hi Arthur Wood ,

still the same error!!! Please help again...

Thanx

0
 

Author Comment

by:ray14
ID: 7182698
Hi Arthur Wood ,

still the same error!!! Please help again...

Thanx

0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 7182699
gueuss you Can't change the value in the recordset associated with a Datraenvironment.  I do not use DEs, so I can't help beyond that.  Sorry.  My guess would be that the Associated recordset set is a Static Type, hence cannot be updated.

Arthur Wood
0
 
LVL 13

Expert Comment

by:John Mc Hale
ID: 7182849
Ray14

Does DataEnvironment support

DataEnvironment.rsCom1.MoveFirst

DataEnvironment.rsCom1.Edit

DataEnvironment.rsCom1![F1] = i

DataEnvironment.rsCom1.Update

0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7183010
fredthered, Edit does not exist in ADO.

ray14 , your command is surely read-only. Change it to anything else.
0
 

Author Comment

by:ray14
ID: 7183273
hi emoreau,

Sorry for being late.
You are right. The command was Read only ...I changed it into "Optimistic" then it runs well !!!

Many Many Thanks!!!
Ray14
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now