I am using the datalogic memor scanner (Intel XScale PXA255 @ 200 MHz, 64 MB system memory, and system flash memory)
128 M), the operating system is WinCE
5.0. The database is sqlite3. Can I read a TXT file containing 0.2 million rows of data and write it to the SQLite database in the. NET environment?
My current practice is: Read the file content line by line, split the data as a parameter, and use DC. parameters. the add () method is added to the insert Statement of sqlitecommand. When all files are read and committed using a transaction, the fastest speed is more than 7 minutes. Which of the following experts has a more efficient way, can it be completed within 5 minutes?
My code is as follows:
Sqlitecommand Dc = ss. createcommand ();
DC. commandtext = "insert into tests values (?,?,?,?) ";
Sqliteparameter dp1 = Dc. createparameter ();
Sqliteparameter dp2 = Dc. createparameter ();
Sqliteparameter dp3 = Dc. createparameter ();
Sqliteparameter dp4 = Dc. createparameter ();
DC. Parameters. Add (dp1 );
DC. Parameters. Add (dp2 );
DC. Parameters. Add (dp3 );
DC. Parameters. Add (dp4 );
Filestream FS = file. openread (File );
Streamreader sr = new streamreader (FS );
This. lfinishtime. Text = datetime. Now. tostring ();
S = Sr. Readline ();