SQLite Forum

multiple queries
Login
> whose lifetime expires before or during the return to the C# calling context.

Thanks for the insight; that is what seems to be happening although the pzTail pointer remains non-zero on return to C#. 

To me that suggests that the pointer is still alive in the DLL. <i>If that is the case, then an API to return the remaining portion of the SQL would be handy.</i>

Unless I find a way (still trying to find one) to get the  pzTail string value, I have a (I think neat) workaround, as below in pseudo code:

```
while (sql.Length!=0) /* sql = multiple queries separated by ;
{
prepare ...
step ...
finalize ...
executedSQL = the SQL statement that ppStmt executed /*I can get this */
sql = sql.Replace(executedSQL,"");
}
```