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

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

博客园 - 子游

Flash / Flex Tutorial – How to Create a crossdomain.xml file javascript 跨越解决方案 Google OAuth 简单入门与使用 Complete Date Object Reference 速强软件 什么是邮件营销 server variables Oracle 笔记 日期处理 如何配置IIS7的Custom Handlers? 分布式系统设计实践 多线程更新Processbar 什么是在线互动营销 开发自定义控件 ------------Textbox 控件(1) 如何用asp.net做一个图片handler javascript 的 Encode,Javascript,escape,encodeURI,encodeURIComponent,UTF-8 www.sugaroa.com超酷的新一代协同办公自动化系统 超酷的新一代协同办公自动化系统 什么是Rss feed 正确检查上传文件类型或者get mine type from file Sql server 国际化的支持,查询乱码
导入CSV文件进入系统 - 子游 - 博客园
子游 · 2009-11-10 · via 博客园 - 子游

            string filePath = Setting.SourcePath ;
            string sheetName = Setting.SourceFile;
            string strConn = "";

            strConn = (@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + filePath + "';Extended Properties='Text'");

            if (!this.isOpened)
              myOleDbConnection = new OleDbConnection(strConn);

            try
            {
                myOleDbConnection.Open();

                isOpened = true;
                //get all sheets
                //DataTable dataTable = myOleDbConnection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, null);

                //foreach (System.Data.DataRow drow in dataTable.Rows)
                //{
                //    sheetName = drow["Table_Name"].ToString();
                //    DataTable tableColumns = myOleDbConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Columns, new object[] { null, null, sheetName, null });
                //    break;
                //}
               
                OleDbCommand myOleDbCommand = new OleDbCommand("SELECT * FROM " + sheetName, myOleDbConnection);
                dataReader = myOleDbCommand.ExecuteReader();