概要
cscの作法、調べてみた。
練習問題、やってみた。
練習問題
sqliteで、create tableを発行せよ。
サンプルコード
using System;
using System.Text;
using System.IO;
using System.Data.SQLite;
namespace App
{
public class Program {
public static void Main(string[] args) {
SQLiteConnectionStringBuilder ConnectionStr = new SQLiteConnectionStringBuilder();
ConnectionStr.DataSource = "db0.sqlite";
using (SQLiteConnection Connection = new SQLiteConnection(ConnectionStr.ToString()))
{
Connection.Open();
using(SQLiteCommand Command = new SQLiteCommand(Connection))
{
Command.CommandText = "CREATE TABLE IF NOT EXISTS fruit(id INTEGER, name TEXT, number INTEGER, price INTEGER)";
Command.ExecuteNonQuery();
}
}
Console.WriteLine("ok0");
}
}
}
以上。