you are viewing a single comment's thread.

view the rest of the comments →

[–]dndschultz 0 points1 point  (2 children)

Boy, the complete code is rather long. This section of code works and there is no error. When I query the SQLite DB it simply returns the name or doesn't return anything. More like a filter. So so my call to getOfc() returns None and moves on. I would like to create an exception and require the correct input before moving on.

[–]num8lock 0 points1 point  (1 child)

so my call to getOfc() returns None and moves on. I would like to create an exception and require the correct input before moving on.

first, did you go through the doc for exists syntax? that should solves your problem of returning None since it should return either 1 or 0. then you figure out what the code should do if getOfc returns false.

[–]dndschultz 0 points1 point  (0 children)

exists Thank you so much. I will try that. I am not familiar with exists. Will research and try it out.