· 10 years ago · Sep 20, 2016, 06:40 PM
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Threading;
9using System.Threading.Tasks;
10using System.Windows.Forms;
11using System.Data.SQLite;
12using System.IO;
13
14namespace TestyThread
15{
16 public partial class Form1 : Form
17 {
18 public Form1()
19 {
20 InitializeComponent();
21 }
22
23 private void Form1_Load(object sender, EventArgs e)
24 {
25
26 }
27 private void button1_Click(object sender, EventArgs e)
28 {
29 noweokno();
30 }
31 private void noweokno()
32 {
33 using (SQLiteConnection con = new SQLiteConnection("Data Source=synccc.sqlite"))
34 {
35 con.Open();
36 string sql = "CREATE TABLE IF NOT EXISTS DATATABLE(score INTEGER)";
37 SQLiteCommand command = new SQLiteCommand(sql, con);
38 command.ExecuteNonQuery();
39 for(int i=0;i<1000;i++)
40 {
41
42 command.CommandText = "INSERT INTO DATATABLE(score) Values(2)";
43 command.ExecuteNonQuery();
44 }
45 MessageBox.Show("Już");
46 con.Close();
47 }
48 }
49 }
50}