AccessViolationException And NativeException
May 31, 2007
Hello,
I'm developing a multithreading application in C# with Compact
Framework 2.0 and Sql Server 2005 Compact Edition. Sometimes and
randomly, the following exception is thrown :
AccessViolationException in System.Data.SqlServerCe.NativeMethod()...
Why ?
Thank you, very much.
View 3 Replies
Nov 15, 2006
I'n getting a random AccessViolationException during the select operation of an SqlDataSource (ASP.NET 2.x), after I have modified the CommandText from it's Selecting event.
I know it's considered a bad idea to dynamically modify the SQL rather than use parameters, but in this instance, I'm more concerned as to why this exception is occurring. It *only* happens if I modify the CommandText and even then I'd say it only occurs 10% of the time. More annoying than anything is that it is returning the correct results. I can catch the exception from the Selected event and the stack trace reveals that the failing method is SQLExecDirectW.
There is nothing wrong with the CommandText syntax and MS documentation states that it can be changed from the Selecting event, so I'm at odds as to why this is happening.
For completeness, the reason I can't use parameters is that I'm using the ODBC Datasource with a Paradox database (Intersolv drivers). I need an optional predicate and IsNull() is not supported, and I cannot get the {fn IFNULL(?, Table.`Field`)} escape sequence to work with an SQL input parameter.
Can anyone put me out of my misery?
View 1 Replies
View Related
Oct 23, 2007
In my homegrown data layer, I added the ability to do Order By Clauses.
I do one query with an Order By clause (all 6 records in the table retrieved).
Then I do a 2nd query without an Order By (36 of around 200 records in the table retrieved)
And I'm getting Native Exceptions.
ExceptionCode: 0xc00000000c (Null Pointer I believe)
ExceptionAddresss: 0x00c3703c (looks to be in sqlcese30.dll)
Reading: 0x00000005
I ran thru with the debugger, and am finding the error happening inside of a SQLDataReader.Read() call. It's trying to read the 14th of the 36 records that the query has found.
I am all but positive I'm not closing this database connection. The problem is happening while I'm looping off the reader data I just retrieved and in this query there was no ORDER BY clause.
I'm at a loss as to what to do about this. I'm not explicitly closing any database connections, and I'm getting the data right after performing the query.
View 1 Replies
View Related