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

推荐订阅源

V2EX - 技术
V2EX - 技术
P
Privacy International News Feed
Security Latest
Security Latest
H
Hacker News: Front Page
T
Tenable Blog
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Security @ Cisco Blogs
Project Zero
Project Zero
O
OpenAI News
AI
AI
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
NISL@THU
NISL@THU
A
Arctic Wolf
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
罗磊的独立博客
L
LINUX DO - 最新话题
U
Unit 42
S
Security Affairs
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 【当耐特】
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
月光博客
月光博客
Engineering at Meta
Engineering at Meta
腾讯CDC
F
Full Disclosure
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
The Cloudflare Blog

博客园 - 萍踪侠影

c#过滤HTML代码 - 萍踪侠影 - 博客园 也來開發一款日歷控件 制作activeX控件 在aspx頁中獲取DataGrid行序號 - 萍踪侠影 - 博客园 在MasterPage中檢驗User是否登入 - 萍踪侠影 - 博客园 [轉載]Run As Administrator 以編程方式為GridView添加欄位 - 萍踪侠影 - 博客园 Internet Explorer 7中的层叠样式表兼容性 Microsoft Office Web 组件 PivotTable 基础 一個Ajax.NET的查詢實例 js校验的通用工具 將字串轉換為日期型數據的例子 - 萍踪侠影 - 博客园 將datagrid控件內容輸出到excel文件 - 萍踪侠影 - 博客园 C#常用函数集 IPv6 简介 初探AJAX.NET Visual C# 3.0 新特性概览 遍历XML引擎版本以适应代码 微调您的 Web 站点以适应 Windows XP Service Pack 2
ASP讀取excel文件 - 萍踪侠影 - 博客园
萍踪侠影 · 2006-09-08 · via 博客园 - 萍踪侠影

sub getExcel
 Dim Conn,Driver,DBPath,Rs
 Set Conn = Server.CreateObject("ADODB.Connection")
 Driver="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&xlsFile&";Extended Properties=Excel 8.0"
 Conn.Open Driver
 
 Sql="Select * From [Sheet1$]"
 Set Rs=Conn.Execute(Sql)
 IF Rs.Eof And Rs.Bof Then
  Response.write "can't find!"
 Else  
  Do While Not Rs.EOF
  
   Response.write Rs("ITEM")&"<br>"
   Rs.MoveNext
  Loop
 End IF
 
 Rs.Close
 Set Rs=nothing
 Conn.Close
 Set Conn=Nothing
 Response.Write "OK"
End sub

当用 (ADO 或 ODBC 连接到 Microsoft Access 数据库时,可能会收到以下错误信息:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot open the file '(unknown)'.It is already opened exclusively by another user, or you need permission to view its data.
解決方法:確保IIS匿名帳戶有以下權限:
1、可訪問注冊表HKey_Local_Machine\SofteWare\ODBC節點;
2、Excel文件本身的讀取權限;
3、Windows臨時文件夾(C:\windows\Temp)的讀取權限;
4、不允許IIS控制密碼(IIS目錄安全性設定)
--------------------------------------------------------------------------------
FYI: MSDN

出现此错误信息的原因有多种:

Microsoft Internet Information Server (IIS) 正在使用的帐户(通常是 IUSR)没有访问基于文件的数据库或访问包含该文件的文件夹的正确 Windows NT 权限。
文件和数据源名称被标记为“独占”。
其他进程或用户将 Access 数据库打开。
该错误可能是由委派问题引起的。请检查身份验证方法:基本与 NTLM(如果有的话)。如果连接字符串使用通用命名约定 (UNC),请尝试使用基本身份验证或诸如 C:\Mydata\Data.mdb 之类的绝对路径。即使 UNC 指向 IIS 计算机的本地资源,也会发生此问题。
当您访问本地 Microsoft Access 数据库且该数据库链接到网络服务器上的 Access 数据库中的表时,也可能会发生此错误。

解决方案

下列项目对应于前面的原因列表:

检查文件和文件夹上的权限。确保您具有创建和/或破坏任何临时文件的能力。临时文件通常在与数据库相同的文件夹中创建,但该文件也可以在诸如 WINNT 文件夹之类的其他文件夹中创建。有关如何识别哪个文件夹没有正确的权限以及如何配置临时文件的其他信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:

253604 (http://support.microsoft.com/kb/253604/EN-US/) PRB:Microsoft Access Database Connectivity Fails in Active Server Pages

如果您使用数据库(UNC 或映射驱动器)的网络路径,请检查共享、文件和文件夹上的权限。
验证文件和数据源名称 (DSN) 没有被标记为“独占”。
“其他用户”可能是 Microsoft Visual InterDev。关闭任何包含指向数据库的数据连接的 Visual InterDev 项目。
简化。使用满足以下条件的系统 DSN:该系统 DSN 使用本地驱动器号。如有必要,请将数据库移到本地驱动器进行测试。
按照以下文章中的说明来变通解决此问题。