Handling Database error messages

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Handling Database error messages

Post by phaworth » Thu Oct 15, 2009 12:12 am

How can you get the specific text of an SQLite error message in Revolution?

The databse functions all return a useless generic message "revdberr, Database error: SQL error or misisng database"

All I can find in the dictionary is the revdb_connectionerr and its synonym. Calling that after the the generic error message above is detected is returning empty which the dictionary claims means there was no error.

I'll be using the SQLite RAISE function to issue custom error messages in some cases and it will be a major issue if I can't find out exactly what error occured.

I use the excellent Firefox plugin to manage my SQLite db's and it returns error messages just fine. Surely if a free tool can handle errors correctly, Revolution should? Is there some other way to do this that I'm missing?

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Post by trevordevore » Thu Oct 15, 2009 1:48 am

I'm not aware of a way to get the exact error message. Perhaps you could file a bug report as it would be very useful and would cut down on debugging time.

As for whether or not a paid tool should have something a free tool has - remember that the free tool is completely dedicated to SQLite. It has a very narrow scope. Revolution's scope is a tad larger, databases being a small segment of that scope. Sometimes an ommission is just an oversite so let the Rev engineers know about it, tell them how it affects you and hope for the best.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Post by phaworth » Thu Oct 15, 2009 1:55 am

Thanks Trevor. I dodn't ant to file a bug report until I knew for sure I wasn't missing something.

I don;t think this problem is limited to SQLite though. It seems that the database routines are common to all SQL implementations and they all refer to the generic "revdberr" error message. Maybe that's a good thing in terms of getting things fixed!

Pete

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”