国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

1

2019-11-17 02:27:37
字體:
來源:轉載
供稿:網友

01

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data;using System.Data.SQLite;namespace 練習2{    class PRogram    {        static void Main(string[] args)        {            string str = @"data source=C:/Users/Administrator/Desktop/math.db";            using(SQLiteConnection con=new SQLiteConnection (str))            {                con.Open();                using(SQLiteCommand cmd=new SQLiteCommand ())                {                    cmd.CommandText = "insert into Student values('李四','Steve jobs')";                    cmd.Connection = con;                    int i = cmd.ExecuteNonQuery();                    if(i>0)                    {                        Console.WriteLine("成功");                    }                    else                    {                        Console.WriteLine("失敗");                    }                    Console.ReadKey();                }            }            //刪除            string str2 = @"data source=C:/Users/Administrator/Desktop/math.db";            using(SQLiteConnection con=new SQLiteConnection (str2))            {                con.Open();                string delStr = "delete from Student where ID='01'";                using(SQLiteCommand cmd=new SQLiteCommand (delStr,con))                {                    int i = cmd.ExecuteNonQuery();                    if(i>0)                    {                        Console.WriteLine("成功");                                            }                    else                    {                        Console.WriteLine("失敗");                    }                    Console.ReadKey();                }            }        }    }}


上一篇:C# memcache

下一篇:NET異步調用Webserver

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 五台县| 台州市| 措美县| 双桥区| 苏尼特左旗| 永川市| 保康县| 明溪县| 邯郸县| 大悟县| 西峡县| 梁平县| 新安县| 莱阳市| 二手房| 马鞍山市| 黔江区| 定南县| 上饶县| 奈曼旗| 平安县| 镇安县| 桑日县| 南乐县| 巴林左旗| 孟州市| 孝昌县| 青岛市| 巨野县| 惠水县| 玛多县| 江口县| 保山市| 防城港市| 临汾市| 永丰县| 恩施市| 白水县| 太仆寺旗| 桐乡市| 马山县|