473,804 Members | 3,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: System.Runtime. EnteropServices .COMException (0x800A0CC1)

1 New Member
Dear all,

Am faced with the above problem. I am designing an application in VB.Net 2003 and using Ms Access 2000 as the database. I have the following code:

Expand|Select|Wrap|Line Numbers
  1.     Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
  2.  
  3.         Try
  4.             Dim response As Short
  5.  
  6.             response = MsgBox("Is the above information correct?", MsgBoxStyle.YesNo, "UBOS")
  7.  
  8.             If response = MsgBoxResult.No Then
  9.                 cboStaffCode.Focus()
  10.                 Exit Sub
  11.  
  12.             Else
  13.                 If Not NewEduc Then
  14.                     rs.Fields(1).Value = cboStaffCode.Text
  15.                     rs.Fields(2).Value = cboQualification.Text
  16.                     rs.Fields(3).Value = txtInstitution.Text
  17.                     rs.Fields(4).Value = dtpDateStarted.Text
  18.                     rs.Fields(5).Value = dtpDateCompleted.Text
  19.                     rs.Fields(6).Value = cboAward.Text
  20.                     rs.Fields(7).Value = cboLevelofAward.Text
  21.                 Else
  22.                     OpenRecordset(("EducationAttainment"))
  23.                     rs.AddNew()
  24.                     rs.Fields(0).Value = cboRecNo.Text
  25.                     rs.Fields(1).Value = cboStaffCode.Text
  26.                     rs.Fields(2).Value = cboQualification.Text
  27.                     rs.Fields(3).Value = txtInstitution.Text
  28.                     rs.Fields(4).Value = dtpDateStarted.Text
  29.                     rs.Fields(5).Value = dtpDateCompleted.Text
  30.                     rs.Fields(6).Value = cboAward.Text
  31.                     rs.Fields(7).Value = cboLevelofAward.Text
  32.                 End If
  33.                 rs.Update()
  34.  
  35.                 MsgBox("1 Record Has Been Saved", MsgBoxStyle.OKOnly, "UBOS")
  36.             End If
  37.             cmdSave.Enabled = False
  38.         Catch ex As Exception
  39.             System.Windows.Forms.MessageBox.Show(ex.ToString)
  40.         End Try
  41.  
  42.  
When I save a new record I have no problem, the problem only arrises when I try to modify a record. I get the following Error Message:

Error: System.Runtime. EnteropServices .COMException (0x800A0CC1): Item cannot be found in the collection corresponding to the requested name or ordinal. at ADODB.Fields.ge t_Item(Object Index)

I ve checked several Forums but I ve failed to get a solution to my problem.


Mona
Oct 8 '07 #1
1 2848
kenobewan
4,871 Recognized Expert Specialist
Welcome to TSDN. Suggest writing messages to find out where it is falling over.
Oct 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2674
by: Don Stevic | last post by:
I am running VS2005 and using VSTO for Word. I keep getting this error saying that there is no source code available for this location when I try and run this application. I am going to try and reinstall Office 2003 and see if that fixes this, but it is talking about the mscorlib.dll and that isn’t Office.
4
8468
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
0
3136
by: null_port | last post by:
Regarding Peter Bromberg's article on saving web pages as mht's using CDO: http://www.eggheadcafe.com/articles/20040527.asp I've been having fits when calling his sample code: msg.CreateMHTMLBody(url,CDO.CdoMHTMLFlags.cdoSuppressNone, "", "" ); It errors with: "Interface not registered"
4
4349
by: neil brown | last post by:
Whenever I try and run a project in VB.NET 2003, all i get is: "An unhandled exception of type 'System.ArgumentException' occurred in Unknown Module. Additional information: The parameter is incorrect." or "An unhandled exception of type
8
8473
by: Philip Colmer | last post by:
I'm rewriting some existing VBScript into VB.Net code. It was all going well until I hit the following error when testing the code: System.Runtime.InteropServices.COMException (0x80041003) at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object args, String paramnames, Boolean CopyBack) The specific call that is failing is:
1
1354
by: Philip Colmer | last post by:
I'm rewriting some existing VBScript into VB.Net code. It was all going well until I hit the following error when testing the code: System.Runtime.InteropServices.COMException (0x80041003) at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object args, String paramnames, Boolean CopyBack) The specific call that is failing is:
6
2793
by: Tomas | last post by:
I'm trying in ASP.NET web page load user accounts from active directory. When I'm developing on local web server it works. I'm using authentication mode=windows and identity impersonate=true When I put page and DLL on server I get COMException. I try to run it on Win2000 server and Win2003 server and I get the same results (COMException) Can anyone help ?
7
5695
by: Kath | last post by:
Hi, I hope this is the most relevant newsgroup for this post. I have a VB.NET app that uses the MapPoint component, and in my app I use pushpins to display/retrieve GPS locations. Occasionally, when I call: objMap.Distance(locNorthPole, locX) my code catches an exception that's raised, the exception is:
11
7036
by: Don | last post by:
When using Visual Basic .NET with a reference to Interop.Outlook, is there a way to get more detailed information about an error other than Exception.Message or Exception.ToString? For example, Outlook's MailItem.SaveAs method can return an error message of "The operation failed", but I have no idea what that means. As a test, I tried SaveAs using a filename that contained illegal characters and got the error message "Internal Application...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.