using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Data.Common;
using System.Data.SQLite;
using System.IO;
namespace WindowsFormsApplication3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }        private void Form1_Load(object sender, EventArgs e)
        {
            System.Data.SQLite.SQLiteConnection.CreateFile("datasource");            System.Data.SQLite.SQLiteConnection conn = new System.Data.SQLite.SQLiteConnection();            string datasource = "D:/Data.db";            System.Data.SQLite.SQLiteConnectionStringBuilder connstr = new System.Data.SQLite.SQLiteConnectionStringBuilder();            connstr.DataSource = datasource;            conn.ConnectionString = connstr.ToString();            conn.Open();            System.Data.SQLite.SQLiteCommand cmd = new System.Data.SQLite.SQLiteCommand();            cmd.Connection = conn;            Stopwatch watch = new Stopwatch();            watch.Start();            string sql = "SELECT * FROM test WHERE S LIKE '%100'";            cmd.CommandText = sql;            cmd.ExecuteNonQuery();            System.Data.SQLite.SQLiteDataReader reader = cmd.ExecuteReader();            watch.Stop();
            
            saveFileDialog1.Filter = "二进制文件(*.dat)|*.dat";            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
               
                FileStream myStream = new FileStream(saveFileDialog1.FileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
                
                BinaryWriter myWriter = new BinaryWriter(myStream);
              
               myWriter.Write(reader.Read());             
                myWriter.Close();
              
                myStream.Close();             }
       
        }
    }
}
是不是这句错了?select的结果无法存入二进制文件中。还有谁能把停表的显示在winForm中弄出来。再此谢过了