SQLite Forum

sqlite3_exec: Any way to validate the first argument?
Login
If I open multiple databases, I can track the handles:
<code>
 DBName                     DBHandle
 D:/SQLITE32/DB/AJAY.DB    145696128
 D:/SQLITE32/DB/CHINOOK.DB 145762024
 D:/SQLITE32/DB/SALES.DB   145953624
</code>

The last database that I open figures in the list of attached databases.
<code>
 ALIAS DATABASE
 main  D:\SQLITE32\DB\SALES.DB
</code>

It is quite easy to transpose the digits in the handles of opened databases. 

- a.When an 'invalid' handle is specified, there is no result. 
- b. When there are no rows returned, there is no result.

<b>The point in asking [the question](https://sqlite.org/forum/forumpost/72160f58e547b9ae?t=h) is simply to be able to distinguish between a & b.</b>

Also, is there a (default) handle I can specify to coerce SQLite3 to check whether I have specified a schema in my SQL 

> e.g. select  * from <b>main</b>.sales limit 10;

and to return the results?