Durga D wrote: > I am developing an application with Sqlite3 Database in VC++ 6.0. Here, > I tried for bulk insertions with CppSQLite3Statement. But, It's allowing > duplicate records in my database even primary key existed. > > First, I inserted 50000 records with insert query and transactions for > every 25000. > Second, same data inserted by prepared statement CppSQLite3Statement and > transactions for every 25000. > > Create Table Query: create table TestDB (Column1 INTEGER ,Column2 TEXT(1120) > primary key collate nocase,Column3 INTEGER ,Column4 TEXT(1120) ,Column5 > TEXT(1120) ,Column6 INTEGER ,Column7 TEXT(1120) ,Column8 INTEGER ,Column9 > INTEGER );
Either the data you are inserting into Column2 is different between the two runs (trailing spaces, perhaps?) or you are inserting into different database files. After the database is filled with allegedly duplicate data, what do the following queries return? select count(*) from TestDB; select count(*) from (select 1 from TestDB group by Column2 having count(*) > 1); Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users