.NETGURU
Weird Database error
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oledb' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Jon Maz
-- Moved from [aspngdata] to [ngfx-oledb] by Bob Levittan <Click here to reveal e-mail address> --

Hi,

I have just started getting the following bizarre error message when my
asp.net page queries the Access DB:

Exception Details: System.InvalidCastException: The data value could not be
converted for reasons other than sign mismatch or data overflow. For
example, the data was corrupted in the data store but the row was still
retrievable.

Not only do I have no idea what could be going on, I'm not really even sure
what an InvalidCastException is, or what can cause it. Can anyone explain?
Has anyone else encountered and solved this error?

Thanks,

JON

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/2002

Reply to this message...
 
    
Ronda Pederson (VIP)
John,

It means that you are trying to insert a value that does not conform to your
field type. This is often seen with date and time formats. You might check
anything that is a string that is going into an integer field also and cast
it into an integer before trying your insert statement. I believe you may
also possibly get this error in Access if your data is longer than the field
allows so you might check the length of your insert data.

HTH,

Ronda

-----Original Message-----
From: Jon Maz [mailto:Click here to reveal e-mail address]
Sent: Monday, May 13, 2002 1:14 PM
To: ngfx-oledb
Subject: [ngfx-oledb] Weird Database error

-- Moved from [aspngdata] to [ngfx-oledb] by Bob Levittan
<Click here to reveal e-mail address> --

Hi,

I have just started getting the following bizarre error message when my
asp.net page queries the Access DB:

Exception Details: System.InvalidCastException: The data value could not be
converted for reasons other than sign mismatch or data overflow. For
example, the data was corrupted in the data store but the row was still
retrievable.

Not only do I have no idea what could be going on, I'm not really even sure
what an InvalidCastException is, or what can cause it. Can anyone explain?
Has anyone else encountered and solved this error?

Thanks,

JON

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/2002

| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
 
 
System.InvalidCastException




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification