Database queries to work on handles

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

Database queries to work on handles

Post by jassing »

The more I'm working with databases in PB, the more I wish the queries would work off handles of the query, not the database.

If we could

Code: Select all

hQueryHandle=databasequery(hDatabaseHandle,"Select * from Employees;")
if h 
while NextDatabaseRow(hQueryHandle)
  cLastname = GetDatabaseString(hQueryHandle,0)
wend
FinishDatabaseQuery(hQueryHandle)
We could then use nested Queries w/o opening additional file handles; and if a threaded app, wouldn't have to have performance hit due to waiting for mutexes...