
ADO.NET
文章平均质量分 70
美好晨光
专业:计算机软件
展开
-
DataTable 结构
using System;using System.Data;namespace ProductManager{ static class DBTable { private static DataSet dataSet; private static DataTable worker, provider, product, productBuy, pr原创 2009-07-19 14:20:00 · 667 阅读 · 0 评论 -
SqlBulkCopy
using System.Data;using System.Data.SqlClient;try{ if (SqlConnection.State == ConnectionState.Closed) SqlConnection.Open(); using (SqlBulkCopy bcp = new SqlBulkCopy(SqlConnection))原创 2009-11-27 22:51:00 · 508 阅读 · 0 评论 -
ImageSQL/FormImageSQL.Designer.cs
namespace ImageSQL{ partial class FormImageSQL { private System.ComponentModel.IContainer components = null; protected override void Dispose(bool disposing) { i原创 2010-01-29 15:37:00 · 351 阅读 · 0 评论 -
ImageSQL/FormImageSQL.cs
use mastergoif DB_ID(UserImage) is not null drop database UserImagecreate database UserImagegouse UserImagegocreate table Images( Image_Name nvarchar(255) primary key, Image_Data Image not null)go原创 2010-01-29 15:39:00 · 412 阅读 · 0 评论 -
ImageSQL/Program.cs
using System;using System.Runtime.InteropServices;using System.Threading;using System.Windows.Forms;using Microsoft.Win32;namespace ImageSQL{ static class Program { #region DllImportAtt原创 2010-01-29 15:40:00 · 357 阅读 · 0 评论 -
FormExcel.cs
using System;using System.Data;using System.IO;using System.Text;using System.Windows.Forms;namespace WinFormExcel{ public partial class FormExcel : Form { private DataTable table;原创 2010-02-08 20:19:00 · 438 阅读 · 0 评论 -
LINQ to ListControl
/*use mastergoif DB_ID(UserBase) is not null drop database UserBasecreate database UserBasegouse UserBasegocreate table UserTable( UserID varchar(10) primary key, UserName nvarchar(20) not null)go原创 2010-03-24 14:26:00 · 468 阅读 · 0 评论 -
ExtensionMethod.cs
using System;using System.Data;using System.Linq;using System.Windows.Forms;using Excel = Microsoft.Office.Interop.Excel;namespace WinFormExcel{ static class ExtensionMethod {原创 2010-02-08 20:21:00 · 334 阅读 · 0 评论 -
C# 将DataGridView控件内容导出到Excel报表
using System;using System.Data;using System.Drawing;using System.Globalization;using System.IO;using System.Linq;using System.Windows.Forms;using Excel = Microsoft.Office.Interop.Excel;原创 2010-02-09 08:41:00 · 710 阅读 · 0 评论 -
OleDbConnectionStringBuilder
using System.Data;using System.Data.OleDb;Microsoft Excel:OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder();builder.Provider = "Microsoft.ACE.OLEDB.12.0"; // "Microsoft.Jet.原创 2009-11-27 22:47:00 · 1200 阅读 · 0 评论 -
Image To SQL Server
/*use mastergoif DB_ID(UserImage) is not null drop database UserImagecreate database UserImagegouse UserImagegocreate table Images( Image_Name nvarchar(255) primary key, Image_Data Image not null)原创 2009-11-27 22:05:00 · 498 阅读 · 0 评论 -
GetNewID
using System.Data;using System.Linq;#regionpublic string GetNewID(this DataView dataView, string letters){ dataView.RowFilter = null; // 清除该筛选器。 dataView.RowStateFilter = DataViewRowState.Cur原创 2009-11-27 22:33:00 · 683 阅读 · 0 评论 -
DataColumn.Expression 表达式
获取或设置表达式,用于筛选行、计算列中的值或创建聚合列。 命名空间: System.Data程序集: System.Data(在 System.Data.dll 中)属性值类型:System.String用来计算列的值,或创建聚合列的表达式。表达式的返回类型由列的 DataType 来确定。 异常异常条件ArgumentExc原创 2009-07-19 14:19:00 · 1292 阅读 · 0 评论 -
DataView.RowFilter 时间段统计
using System.Windows.Forms; System.Windows.Forms.ComboBox comboName = new System.Windows.Forms.ComboBox(); this.comboName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Dro原创 2009-07-19 14:18:00 · 1116 阅读 · 0 评论 -
LINQ to ListControl
using System.Data;using System.Data.SqlClient;using System.Linq;绑定 ListControl 的数据源:try{ SqlCommand cmd = new SqlCommand("CommandText", SqlConnection); cmd.CommandType = CommandType.StoredProc原创 2009-11-27 22:40:00 · 366 阅读 · 0 评论 -
SqlCommandBuilder
using System.Data;using System.Data.SqlClient;public DataView LoadData(){ try { using (SqlDataAdapter da = new SqlDataAdapter("select * from Provider", ClassConnection.Connection))原创 2009-11-27 22:51:00 · 467 阅读 · 0 评论 -
SqlConnectionStringBuilder
using System;using System.Data.SqlClient;SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();builder.DataSource = Environment.MachineName; // builder["server"]builder.InitialCa原创 2009-11-27 22:51:00 · 602 阅读 · 0 评论 -
DBConnection
using System;using System.Data.SqlClient;using System.ServiceProcess;using System.Windows.Forms;namespace ProductManager{ static class DBConnection { private static SqlConnection sql;原创 2009-11-27 23:03:00 · 619 阅读 · 0 评论 -
BackupDatabase
using System;using System.IO;using System.Linq;using System.Runtime.InteropServices;using System.ServiceProcess;using System.Windows.Forms;using Microsoft.Win32;namespace DIYBackupDB{ public par原创 2009-11-27 22:09:00 · 507 阅读 · 0 评论 -
C# 获取文件信息并导出Excel,Xml报表
using System;using System.Data;using System.Drawing;using System.Globalization;using System.IO;using System.Windows.Forms;using Excel = Microsoft.Office.Interop.Excel;// 添加引用 -> .NET ->原创 2010-02-09 08:38:00 · 501 阅读 · 0 评论