⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connection.cs

📁 网络营销软件的源代码
💻 CS
字号:
using System;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;


namespace WebApplication8.firstPage
{
	/// <summary>
	/// Connection 的摘要说明。
	/// </summary>
	public class Connection
	{
		SqlConnection connection;
		SqlCommand command;

		public Connection(string c)
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
			connection = new SqlConnection();
			command = new SqlCommand();

			connection.ConnectionString = c;
			command.Connection = connection;
			connection.Open();
		}

		public SqlDataReader execute(string sql)
		{
			command.CommandText = sql;
			return command.ExecuteReader();
		}

		public void close()
		{
			connection.Close();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -