use the javascript to operate database (sql or access)
there are the code snippet:
var rsTopTen
var strInner
var strCntInner
var ConnectionString
rsTopTen = new ActiveXObject("ADODB.Recordset");
// Build the connection string
//
// ConnectionString Format below:
//ConnectionString = "DRIVER=SQL Server;SERVER=MySQLServer;CATALOG=MyDatabase;UID=USERID;PWD=Password";
//
// for SQL 7.0:
//ConnectionString = "DRIVER=SQL Server;SERVER=TopTen;CATALOG=TopTen;UID=TopTen;PWD=TopTen";
//
// for Access Database (on Server):
//ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=\\\\demwwwdev01\\develop\\im\\security\\TopTen.mdb";
//
// for Access Database (on local drive):
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\\TopTen\\TopTen.mdb";
// Build a SQL statement
strSQL = "SELECT TopTenName, TopTenCount FROM TopTen ORDER BY TopTenCount DESC";
// Open the recordset
rsTopTen.Open(strSQL, ConnectionString, 3,1,1);
// Loop through the Recordset
while(!rsTopTen.EOF)
{
//写出.......
}
Subscribe to:
Post Comments (Atom)
Search This Blog
Labels
news
China
society
Cheng Du
chengdu
live
economy
EARTH
Sichuan
entertainment
health
ET
dnn
medicine
tip
Children
Olympic Games
SOS
Tibet
module
school
ACTIVEX
RMB
Tibet incident
WSS
acupuncture
banting
compare
cure
enterprise forms
herbalist doctor
industry
integration
internet
meaningful
optimizing
question
.net
AIM / AOL
Android 灭鼠
Android 猪
CPPCC
Data delay load
Differencing disks
GoogleTalk
Holidays
ICQ
IM
IT
Interpersonal
MSDN programmer
MSN
NewSID
PLANET
Phishing
QQ
Session
TUS 翻墙 GFW
Traffic
Translation
UFO
VPC
What is the most regret in life
YAHOO
advantage
android
answer
aphorism
blog
born
business
cancer
conclusion
discuss
extraordinary memory
festival
film
fish
fo
fun
help
human
interesting
man
match
microsoft
music
new theory
old
photo
pidgin
plan
power
problem
procreate
relations
say
sharepoint
sid
solve
template
test
version
vs2010
wangboqiang
woman
words
四角号码在线查询
墙 GFW Android
开发 vs2008 vss2005 win2008
No comments:
Post a Comment