[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Please amend this code

Posted on 2002-07-27
7
Medium Priority
?
234 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 70

Accepted Solution

by:
Éric Moreau earned 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

830 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