Hi all ,
  I need to insert 500 records (each record has 12 bytes) to a table and it 
takes me approximately 2 seconds.
  Is there a way to improve my code so it can do it faster?
   
  Thanks in advance,
  Marco.
   
  Here is my code:
   
  query = sqlite3_mprintf("Insert into Inventory (Tag)  values (?)");
rc=sqlite3_prepare_v2(DB,query ,-1,&Statement,NULL);
  if (rc!=SQLITE_OK)
     error_print();

for (i=1;500;i ++)
   {
    rc=sqlite3_bind_text(Statement,1,list[i],-1,NULL);
        if (rc!=SQLITE_OK)
          error_print();


      rc=sqlite3_step(Statement);
        if (rc!=SQLITE_DONE)
         error_print();

     sqlite3_reset(&Statement) ;
  }
   
  
 

  

 
   
   

       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to