SQLite Forum

sqlite3_exec: the 3rd argument
> That you ask for the actual code raises doubts in my mind;

I cannot imagine why, so it would be educational for you to say why.

You might be interested to know that when I substitute your code into a demo .Net Core console application targeting 'Any CPU', change the DB and table name literals to match some databases I have laying around, and put a 64-bit sqlite3.dll next to the .exe, then I can build the app and run it without any address faults, including blatting out a table with 22588 rows.

Is that code in your post 15 what is actually producing address faults for you?