Click here to Skip to main content
15,892,927 members

crash filling dataadapter

T2102 asked:

Open original thread
I am perplexed figuring out why a malformed query of a gmail account in outlook crashes my application instead of simply raising an exception. Seems that there is an uncaught win32 exception based on calling the code from unmanaged C++. The error goes away when I change the outlook profile location. I still don't understand why my .NET code could not catch the exception as I had nested > 20 exceptions to try to catch the issue.

I also can't directly debug the code in .NET since I am unable to set the STAAttribute and my compiler Visual Studio 2010 Professional doesn't allow me to debug C++/CLI code.
http://winterdom.com/2007/02/jetmapiandsta[^]

The query error is simple with # missing on a date
SELECT * FROM inbox WHERE Body Like '%BWIC%' And rECEIVED>=#07/26/2012

I've tried adding many exceptions to the catch statement, but can't prevent the crash.

C++
System::Data::DataSet ^db_DataSet=gcnew System::Data::DataSet;	
int const Fill_Result=db_Adapter.Fill(db_DataSet);
}
catch (System::Exception ^ex) {
    ex;
}
catch (...) {
    ;
}
finally {
   if (db_Conn)
       db_Conn.close();
}
Tags: C++/CLI, ADO.NET

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900