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

推荐订阅源

Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
P
Proofpoint News Feed
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
The Last Watchdog
The Last Watchdog
F
Fortinet All Blogs
S
Schneier on Security
Help Net Security
Help Net Security
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
I
InfoQ
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
Stack Overflow Blog
Stack Overflow Blog
T
Troy Hunt's Blog
人人都是产品经理
人人都是产品经理
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
Forbes - Security
Forbes - Security
Vercel News
Vercel News
S
Security Affairs
美团技术团队
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Jina AI
Jina AI
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
IT之家
IT之家
U
Unit 42
Recorded Future
Recorded Future
W
WeLiveSecurity
PCI Perspectives
PCI Perspectives
P
Palo Alto Networks Blog
H
Hacker News: Front Page
S
Security @ Cisco Blogs
博客园 - 【当耐特】

博客园 - 小小点

使用 C# 将数字转换成大写人民币 发个自己写的分页类 计划+日程表+严格执行 今天开始做事 享受过程 明天失踪一天 加班加班 JS模拟类实现 不能连接MySQL数据库的解决办法 解决安装 MSSQL 提示有挂起的安装问题 [转载] ASP中无组件上传文件 PHP读MYSQL中文乱码的解决方法 自己定义的模仿窗体标题栏的控件 意料之中 在b/s开发中经常用到的javaScript技术 [转贴] 关机脚本(转载) 离开... 在MSSQL中利用存储过程进行分页查询 压缩MSSQL数据库日志文件大小
DHTML文件访问本地数据库[转]
小小点 · 2005-12-16 · via 博客园 - 小小点

<html>
<head>
<title>get data from database at client</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<style type="text/css">
<!--
body{font-family:Times New Roman;font-size:9pt;}
table{font-family:Times New Roman;font-size:9pt;}
button{color:blue;}
//-->
</style>
<script language="Javascript">
<!--
 function connectDB()
 {
 try{
 var count=0;
 var conn=new ActiveXObject("ADODB.Connection");
 var rs=new ActiveXObject("ADODB.Recordset");
 var connectString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\\db1.mdb";
 var selectString="select top 5 * from TUser";
 var tableString="";
 conn.ConnectionString=connectString;
 
 conn.open();
 alert(conn.ConnectionString);
 rs=conn.execute(selectString);
 while(!rs.EOF)
{
 if(count++==0)
 {
 tableString+="<table border='1'><tr><td>"+rs(0).name+"</td>";
 tableString+="<td>"+rs(1).name+"</td></tr>";
 }
 tableString+="<tr><td>"+rs(0).value+"</td>";
 tableString+="<td>"+rs(1).value+"</td></tr>";
 rs.moveNext();
 }
 tableString+="</table><br>";
 document.getElementById("dataArea").innerHTML=tableString;
 rs.close();
 conn.close;
}
catch(e)
 {
 document.write(e.toString());
 }
}
//-->
</script>
</head>
<body>
<div id="dataArea"></div>
<button onclick="connectDB();">retrieve data</button>
</body>
</html>

posted @ 2005-12-16 16:42  小小点  阅读(304)  评论()    收藏  举报