Recent

Author Topic: Tsqlite3dataset error handlin  (Read 4850 times)

Kyjan

  • New Member
  • *
  • Posts: 41
Tsqlite3dataset error handlin
« on: January 19, 2011, 10:17:38 pm »
Hi guys,

currently I'm working on a a serious project for lawyers. For database handling I use tsqlite3dataset which is perfect for my demands. The project is in final stage, and I'm trying to implement some error handling.
The question: how can I handle the Edatabaseerror events with tsqlite3dataset, becouse the usual try..except structure doesn't work for me.
Thanks for the help,
Regards
Kyjan

davesimplewear

  • Sr. Member
  • ****
  • Posts: 321
    • Davids Freeware
Re: Tsqlite3dataset error handlin
« Reply #1 on: January 20, 2011, 01:32:23 am »
Luiz usually answers these as he is a developer of this dataset, maybe if you pm he will be able to help you.
All things considered insanity seems the best option

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Tsqlite3dataset error handlin
« Reply #2 on: January 20, 2011, 02:08:24 am »
For ExecSQL and inherited methods like Open, Append you can use the try except that should work

ApplyUpdates does not use exception. You should check the returned value (a boolean) and if false check the ReturnString/ReturnCode methods. In the future will also use exceptions.

Kyjan

  • New Member
  • *
  • Posts: 41
Re: Tsqlite3dataset error handlin
« Reply #3 on: January 20, 2011, 01:17:12 pm »
Thank you, guys, I'll do that way.

 

TinyPortal © 2005-2018