Code:
stock retrieve_data(query[]="",output[][32])
{
g_SqlTuple = e_core_get_sql_handle()
server_print(query)
new ErrorCode
SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_Error,511)
if(g_SqlTuple == Empty_Handle)
set_fail_state(g_Error)
It can be this set of code. If SQL_Connect return a 0 or Empty_Handle Then you will get that error. It because it couldn't possible connect to your database. It will return Empty_Handle and you will get Invalid Database Handle: 0
Edit.
You will get the Invalid Database Handle: 0 on native like SQL_PrepareQuery and SQL_Execute. If the Sqlconnection has an Empty_Handle
__________________