Browse files

Starting SQLite

  • Loading branch information...
1 parent 966124f commit 80e1599ecbf4884121bb3251950540f8cd8c2fe4 @tyrelsouza tyrelsouza committed Mar 18, 2012
Showing with 29 additions and 13 deletions.
  1. BIN SQLite-1.0.66.0-setup.exe
  2. BIN Torch2.suo
  3. +29 −1 Torch2/frmConfig.cs
  4. +0 −12 Torch2/frmConfig.designer.cs
View
BIN SQLite-1.0.66.0-setup.exe
Binary file not shown.
View
BIN Torch2.suo
Binary file not shown.
View
30 Torch2/frmConfig.cs
@@ -7,6 +7,8 @@
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
+using System.Data.SQLite;
+
namespace Torch2
{
@@ -42,7 +44,6 @@ private void bVerify_Click(object sender, EventArgs e)
dataGridControl.DataSource = null;
dataGridControl.DataSource = tData;
- label6.Text = tData.Count.ToString();
}
private void tPartNo_Leave(object sender, System.EventArgs e)
@@ -81,4 +82,31 @@ public class TableData
public string flow4 { get; set; }
}
+ public class confDB
+ {
+ public List<String> update()
+ {
+ String connString = "Data Source=C:\\Program Files\\TorchTester2\\contacts.db";
+ using (SQLiteConnection conn = new SQLiteConnection(connString))
+ {
+ StringBuilder query = new StringBuilder();
+ query.Append("SELECT * ");
+ query.Append("FROM friends ");
+ query.Append("ORDER BY name");
+ using (SQLiteCommand cmd = new SQLiteCommand(query.ToString(), conn))
+ {
+ conn.Open();
+ using (SQLiteDataReader dr = cmd.ExecuteReader())
+ {
+ while (dr.Read())
+ {
+ Console.WriteLine(dr.GetValue(0) + " " + dr.GetValue(1) + " " + dr.GetValue(2));
+ }
+ }
+ }
+ }
+ return null;
+ }
+ }
+
}
View
12 Torch2/frmConfig.designer.cs
@@ -47,7 +47,6 @@ private void InitializeComponent()
this.label5 = new System.Windows.Forms.Label();
this.bSave = new System.Windows.Forms.Button();
this.dataGridControl = new System.Windows.Forms.DataGridView();
- this.label6 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridControl)).BeginInit();
this.SuspendLayout();
//
@@ -203,21 +202,11 @@ private void InitializeComponent()
this.dataGridControl.Size = new System.Drawing.Size(1145, 347);
this.dataGridControl.TabIndex = 0;
//
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(533, 15);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(35, 13);
- this.label6.TabIndex = 21;
- this.label6.Text = "label6";
- //
// frmConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1169, 506);
- this.Controls.Add(this.label6);
this.Controls.Add(this.bSave);
this.Controls.Add(this.tFlow4);
this.Controls.Add(this.tFlow3);
@@ -266,7 +255,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button bSave;
private System.Windows.Forms.DataGridView dataGridControl;
- private System.Windows.Forms.Label label6;
}
}

0 comments on commit 80e1599

Please sign in to comment.