in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Sqlite Exception - include SQL statement?

Last post 02-23-2007 5:13 PM by Sam_. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-06-2006 9:41 PM

    Sqlite Exception - include SQL statement?

    Is it possible for your wrapper to include the SQL statement that was being run in the exception that gets thrown?  This would definately make it easier to know what the system was trying to do when things started to break.  For basic syntax errors, it makes it easy to spot without trying to reproduce the error, and for other errors the SQL would give an idea of where in a process things died.
  • 03-06-2006 10:29 PM In reply to

    Re: Sqlite Exception - include SQL statement?

    It's not always possible, but I'll look into it.

    Robert

     

  • 03-07-2006 1:39 PM In reply to

    Re: Sqlite Exception - include SQL statement?

    Much appreciated. Thanks.
  • 03-10-2006 11:56 AM In reply to

    Re: Sqlite Exception - include SQL statement?

    This would defintily be helpful
  • 06-08-2006 9:55 AM In reply to

    • pLu
    • Top 100 Contributor
    • Joined on 12-05-2005
    • Sweden
    • Posts 13

    Re: Sqlite Exception - include SQL statement?

    I second that request! Maybe add it to Exception.Data?
  • 07-21-2006 1:52 PM In reply to

    Re: Sqlite Exception - include SQL statement?

    Definitely helpful, but if you're a consumer of the SQLite ADO library, make sure that you've evaluated the security surrounding this.

    For example... you wouldn't want a web app to dump the SQL statement back to the user (which would give hackers an idea of the schema of your db). This *shouldn't* be a problem with production apps (as errors should be replaced by a generic "whoops!" page), but there's a big difference between *should* and is!

    Just a thought.

    Trev

  • 07-31-2006 4:59 AM In reply to

    • pLu
    • Top 100 Contributor
    • Joined on 12-05-2005
    • Sweden
    • Posts 13

    Re: Sqlite Exception - include SQL statement?

    A very good point indeed. A feature limited to Debug builds? If at all.
  • 02-23-2007 5:13 PM In reply to

    • Sam_
    • Top 10 Contributor
    • Joined on 02-13-2007
    • Washington DC
    • Posts 87

    Re: Sqlite Exception - include SQL statement?

    security issues for this are big.  I'd turn it off by default and then have it configurable via a connection string parameter (which also makes it fully backwards compatible).

    In my own apps I always funnel all sql calls through my own wrapper and I do include sql in the message, but it's also my app and not a component and I know I never show users the raw error message.  :-)

    Sam
    We're hiring! B-Line Medical is seeking .NET Developers for exciting positions in medical product development in MD/DC. Work with a variety of technologies in a relaxed team environment. See ads on http://careerbuilder.com.
Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems