473,378 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Comexception Was Unhandled Type Mismatch

Hello All, I 'm having problem with a comException - Type Mismatch error, I have checked the data types in my table which resides in an Ms Access database. A snippet of code is posted below, the line that produces the error is sandwiched in TRY/CATCH statments, if I remove the lines(the line that produces the error and the TRY/CATCH statements the error will move to the next line.


'save the main client complaint information
rstComplaint.Fields("LotNumber").Value = Me.txtLotNumber.Text
rstComplaint.Fields("ClientName").Value = Me.txtClientName.Text
rstComplaint.Fields("LabArea").Value = Me.cboLabArea.Text
Try
rstComplaint.Fields("TakenBy").Value = Me.txtEnteredBy.Text
' the error as displayed inside the .net IDE points to the line above, the catch statement is not executed
Catch ex As Exception
MsgBox(ex.Message)

End Try
rstComplaint.Fields("ComplaintStatus").Value = strComplaintStatus

rstComplaint.Fields("ProjectName").Value = Me.txtProjName.Text

Any help that anyone can provide would be greatly appreciated
Jul 20 '07 #1
1 2164
Frinavale
9,735 Expert Mod 8TB
Hello All, I 'm having problem with a comException - Type Mismatch error, I have checked the data types in my table which resides in an Ms Access database. A snippet of code is posted below, the line that produces the error is sandwiched in TRY/CATCH statments, if I remove the lines(the line that produces the error and the TRY/CATCH statements the error will move to the next line.

...
Hi Edward :)

Could you please past the exact exception message that your getting.

Thanks

-Frinny
Jul 20 '07 #2

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

Similar topics

3
by: Damaji Jambhale | last post by:
COMException: Catostrphic failure When I added a "dll" reference in the web project. I was able to instantiate the class OK. But when I tried to set the properties, it failed with...
1
by: LJgrnl | last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData has the initial value False. If a recordset comes back empty (both .EOF and ..BOF are true) then blnNoData is set to...
1
by: Zoury | last post by:
Hi there! :O) I trying to use a COM DLL (made in VB 6.0) from C#... and it hasn't been working well for me this far.. :O/ I did a sample in VB 6.0 that used the DLL and it works great.. so now...
2
by: Bassel Tabbara | last post by:
I wrote the following code: oApp = new Outlook.Application(); oApp = new Outlook.Application(); oNameSpace= oApp.GetNamespace("MAPI"); oNameSpace.Logon(null,null,true,true); //gets defaultfolder...
1
by: MovnOn | last post by:
I'm writing a program that uses a COM object. If I were writing this code in VB6, the signature of the method of the COM object I need to use would be: saveMemo (Collection) The method takes a...
5
by: mattiassich | last post by:
The following code causes unhandled exception on the line: New ManagementObjectSearcher(query) Dim mos As System.Management.ManagementObjectSearcher Dim moc As...
1
by: marfi95 | last post by:
I'm trying to call a 3rd party ocx from my vb.net app. I've added the ocx by customizing the toolbox so the interop references get added automatically. However, when I make a call to the ocx, I...
3
by: Jay A. Moritz | last post by:
I have an application that loads IE and iterates through web pages to retrieve information from the page then activates specific controls to retrieve the next page and iterate through that page for...
19
by: Kapps | last post by:
Hi, I'm having a problem with my program not being able to run on certain computers. They have the basics, such as the .Net Frameworks. Upon trying to run the program, it gives the error: ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.