Results 1 to 4 of 4

Thread: SqlServerCe Crashes

  1. #1

    Thread Starter
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160

    SqlServerCe Crashes

    I have created an app that uses SQL Server CE, it's pretty cool, and way faster then the way I was doing it before.

    However around every 120-130 updates it sends an error System.Data.SqlserCe.SqlCeException. (Note it crashes on a Query, so for each update there is one query so it's really around 240 sql queries when it dies.) The error message does not offer many details. I have to exit all the way out of the application before it will let me make another connection to the DB without crashing.

    I thought maybe it was a ram issue and added a bunch of GC.Collect Statements but it did not help. I am using a Symbol MC 1000 and so I installed the software onto a PPT 8800, which has more ram. But I still got the same error at the same place.

    I wouldn't even mind If I just had to reset the SQL connection, but I can not get it to connect to the SQL CE DB unless I exit all the way out of my program.
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: SqlServerCe Crashes

    If you are sure that your SQL is correct, can you trap the error and repeat if necessary?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160

    Re: SqlServerCe Crashes

    It doing the exact same thing, over and over again.

    Select Row, UpdateRow.

    I am re-writing the way I do my connection. so far I am reusing the same connection, I am going to have it open and close the connection with each query and see if that makes a difference.
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

  4. #4

    Thread Starter
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160

    Re: SqlServerCe Crashes

    I fixed it. Instead of reusing the same connection, I close and open the connection for each set of queries. It's a little slower, but it does not crash.
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width