惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - .NET初学者俱乐部

给 .net C# 初学者几点建议 软件设计题视频教程下载,不错哟! 地球黑匣子,这个创意怎么样? 在实际开发中碰到的小问题,保存数据时提示:对象必须实现 IConvertible asp.net中使用ajax简单例子 asp.net 版 大学英语四六级、雅思、托福考试系统应用程序实例 spread 7.0 基础知识、程序示例、设置CheckBox、image 格式 C# 操作 Excel 与 C#操作 word 示例大全 asp.net 初学者应用程序示例网 公交车上的艳遇,那对被挤扁了..... 一个 .net 程序员的梦想!大哥们帮帮我好吗? 数据访问优化性能(转载) 全面优化ADO kinmax(转贴) 如何直接将.aspx页面直接生成静态页面.htm (转载) asp.net初学者 零起点 从入门到精通的网站! 再别康桥 --徐志摩 .NET打包工具怎么注册 .dll文件?? 一个简单的EXCEL 导入SQL 的例子 大数据量数据库转换程序写后感……
Excel导入SQL 自定义类
.NET初学者俱乐部 · 2007-06-06 · via 博客园 - .NET初学者俱乐部

public class SaveToSql
 {
  public string strNewCodeId = string.Empty;
  public string strNewCode = string.Empty;
  public string strNewDes = string.Empty;
  public string strOldCodeId = string.Empty;
  public string strOldCode = string.Empty;
  public string strOldDes = string.Empty;
  public string Server = string.Empty;
  public string DataBase = string.Empty;
  public string Uid = string.Empty;
  public string Pwd = string.Empty ;
  private string TableName = string.Empty;

  /// <summary>
  /// 目的表的名称
  /// </summary>
  public string TableNames
  {
   get{return TableName;}
   set{TableName=value;}
  }

  public SaveToSql()
  {
  }
  /// <summary>
  /// 保存数据
  /// </summary>
  public  void Save()
  {
   string strConPath = string.Format("server={0};database={1};uid={2};pwd={3}",this.Server,this.DataBase,this.Uid,this.Pwd);
   SqlConnection con1 = new SqlConnection(strConPath);
   con1.Open();
   SqlCommand com1 = new SqlCommand();
   com1.CommandText = "Insert into "+TableName+"(newCodeId,newCode,newDes,oldCodeId,oldCode,oldDes) Values('"+strNewCodeId+"','"+strNewCode+"','"+strNewDes+"','"+strOldCodeId+"','"+strOldCode+"','"+strOldDes+"')";
   com1.Connection=con1;
   com1.ExecuteNonQuery();
   con1.Dispose();

  }
 }