Hello friends!.
I created a dll made ​​in C + + to return values ​​that were surveyed in a database SQLITE3!

At first everything works correctly, BUT , when the database starts to earn enough database tables start getting bigger is that my real problem starts! The operation is totally unstable!

Suddenly I get an crash error.
These errors happen when I need to receive the data.
But not always. Sometimes it works fine and others it can generate a crash error, which I can not identify.

But I managed to identify these occasional errors always happen when I use search functions of data. When I need to get a large number data is then subject to severe receiving a crash error.

could you give me tips so I can STABILISE my function?

Sample my DLL and LiteC Script:

C++
Code:
//Receive data from rows and columns of the DataBase
...
DLLFUNC char* sqlite__select(int r, int c)
{
 //return char value on rows [r] and Column [c]
  return ((char*)result[r][c].c_str());
        
}
...



LiteC, Receive Many data.

Code:
void test_select()
{

int rows = sqlite_rows(); //Total de rows (sample 100 rows)

for(ping = 0; ping < rows; ping ++)
{
//ID			
printf("%s",sqlite_select(ping,0)); //return 0..1..2..3..4..n
//test0
printf("%s",sqlite_select(ping,1)); //return 0..1..2..3..4..n
//test1
printf("%s",sqlite_select(ping,3)); //return 0..1..2..3..4..n
.... test100

}



Can happen or not returning a crash error. (T.T)




Last edited by NeoNeper; 07/05/13 18:45.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________