C# 讀取資料庫
using System.Data;
using System.Data.SqlClient;
SqlConnection conn = new SqlConnection("Data Source=IP ;Initial Catalog=DataBase ;Persist Security Info=True; User ID=ID ;Password=Pass");
conn.Open();
SqlCommand cmd = new SqlCommand("Select * FROM DataBase", conn);
cmd.ExecuteNonQuery(); //執行sql語法
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁