0 Members and 2 Guests are viewing this topic.
[CommandMethod("addit")] public static void addit() { Editor ed = AcAp.Application.DocumentManager.MdiActiveDocument.Editor; System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); string database = "C:\\MySQLite.db"; using (ManagedSQLite.Database db = new ManagedSQLite.Database(database)) { db.ExecuteDML("create table Test6(No int, Name char(64));"); db.BeginTransaction(); for (int i = 0; i < 100000; i++) { db.ExecuteDML(String.Format("insert into Test6 values ({0} , 'Welcome To TheSwamp');", i)); } db.CommitTransaction(); } stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); ed.WriteMessage("\n{0}", elapsedTime); }
Here is the latest build. I changed a few items internally. I think it's about done. Should I add a thread in the "Show your stuff" area?, it might be easier to maintain there.
from memory, your significant other is a tax accountant ... make sure she puts aside the correct percentage
namespace SQLiteNetSample{ public partial class DataGrid : Form { public DataGrid() { InitializeComponent(); BindingSource src = new BindingSource(); src.DataSource = getTable(); this.dataGridView1.DataSource = src; } // DataTable getTable() { using(SQLiteNET.Database db = new SQLiteNET.Database("C:\\Northwind.db")) { return db.GetDataTable("SELECT * FROM Customers"); } } }}
Restarting over here http://www.theswamp.org/index.php?topic=31469.msg370071#new