Only ExecuteNonQuery works?

I Ian Dodds 3 years ago
2 0 0

Hello,

I am having some issues with getting data out of my sdf file. I am trying to use the Compact Sql that comes with the MK3100. I am able to make a sqlceconnection and open it. I am able to make a sqlcecommand, add the connection object and open it that way as well. I can also use ExecuteNonQuery with some limited success. What I mean by that is if my commandtext is an insert statement, the row is added to the table as expected. If it is a select statement then it only ever returns a -1.

But here is the kick in the pants. If I try and use anything else i.e. ExecuteReader, ExecuteScalar, ExecuteResultSet the application crashes.

And I get this error:
ExceptionCode: 0xc0000005
ExceptionAddress: 0x00000000
Reading: 0x00000000

CONTACT
Can’t find what you’re looking for?