DatabaseError() to be specific...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

DatabaseError() to be specific...

Post by jassing »

When working with threaded programs, it would be nice if there was a way to track databseerror() a bit better.
if two threads perform a query, and one errors out, you don't know which thread is the one from DatabaseError() is referencing.

Since things like DatabaseUpdate() and DatabseQuery() don't return a file handle, it would make it hard to track; and using mutex's defeats the purpose of the threads... Especially if they are working on completely different databases... So no idea on best way to deal with; but someway would be better...
(iow I have no idea how to implement it, but fetching the error specific to a call would be better than getting it for "some call")
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: DatabaseError() to be specific...

Post by Fred »

DatabaseError() is already thread specific, so what is the issue ?
infratec
Always Here
Always Here
Posts: 7591
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: DatabaseError() to be specific...

Post by infratec »

Code: Select all

MessageRequester("Error", "Thread X: " + DatabaseError())
Post Reply