韩日无码电影,成人在线观看蜜桃视频观看,四川丝袜一级毛片,久色AⅤ

ASP連接access數(shù)據(jù)庫例程

發(fā)布時間:2006-04-18 22:57:40   瀏覽人數(shù): 525641 次  
  關鍵字: access數(shù)據(jù)庫 - 本站搜索 - Google搜索 - Baidu搜索 - Yahoo搜索 - sougo搜索
ASP連接access數(shù)據(jù)庫例程
注意:要運行上述ACCESS例程請先下載數(shù)據(jù)庫,放在db 或 rwdata文件夾下。請將例程放在根目錄下。
<%
Dim mode
mode=request.form("text4")
if mode=1 then
name=request.form("text1")
age=request.form("text2")
addr=request.form("text3")
if not isnumeric(age) then response.write "age must be number!try again":response.end
age=clng(age)
end if
'********************************************************************
' 與AccessDB相關的連接信息
' 可以參照它建立您的數(shù)據(jù)庫連接
'********************************************************************
Dim conn,rs,dbpath
Set conn=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
dbpath=Server.MapPath("rwdata/db_test_com.mdb")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="&dbpath
'********************************************************************
'********************************************************************

dim strsql
'********************************************************************
' 讀數(shù)據(jù)庫相關操作
sub readdb()
strsql="select * from test"
rs.open strsql,conn,1,1
if rs.EOF then response.write "no record at all":exit sub
response.write "

"
response.write "
"
for i=0 to rs.Fields.Count-1
response.write "
"
next
response.write "
"
while not rs.EOF
response.write "
"
for i=0 to rs.Fields.Count-1
response.write "
"
next
response.write "
"
rs.MoveNext
wend
response.write "
"&rs.Fields(i).Name&"
"&rs.Fields(i).Value&"
"
rs.Close
end sub
'********************************************************************


'********************************************************************
' 寫數(shù)據(jù)庫相關
sub insertdata()
strsql="INSERT INTO test(name,age,addr) VALUES('"&name&"',"&age&",'"&addr&"')"
rs.Open strsql,conn,1,3
end sub
'********************************************************************

if mode=1 then
call insertdata()
response.write "insert ok!"
elseif mode=2 then
call readdb()
end if

'********************************************************************
' 釋放數(shù)據(jù)庫連接對象
set rs=nothing
set conn=nothing
%>







name:
age:
city:






注意:要運行上述ACCESS例程請先下載數(shù)據(jù)庫,放在rwdata文件夾下。請將例程放在根目錄下。




上一篇:空間生效后如何通過Leapftp上傳網(wǎng)頁?
下一篇:FTP工具,空間生效后如何通過flashfxp上傳網(wǎng)頁?

旗下網(wǎng)站:耐思智慧 - 淘域網(wǎng) - 我的400電話 - 中文域名:耐思尼克.cn 耐思尼克.top

耐思智慧 © 版權所有 Copyright © 2000-2025 IISP.COM,Inc. All rights reserved

備案號碼: 粵ICP備09063828號  公安備案號: 公安備案 粵公網(wǎng)安備 44049002000123號  域名注冊服務機構許可:粵D3.1-20240003 CN域名代理自深圳萬維網(wǎng)

聲明:本網(wǎng)站中所使用到的其他各種版權內容,包括但不限于文章、圖片、視頻、音頻、字體等內容版權歸原作者所有,如權利所有人發(fā)現(xiàn),請及時告知,以便我們刪除版權內容

本站程序界面、源代碼受相關法律保護, 未經(jīng)授權, 嚴禁使用; 耐思智慧 © 為我公司注冊商標, 未經(jīng)授權, 嚴禁使用

法律顧問:珠海知名律師 廣東篤行律師事務所 夏天風 律師

日本欧美三级一二三| 人妻无码A∨| 69视频污污污| 无卡无码无免费毛片| 成人色丁香| 中文制宗合久久| 日本50路息子| 国产av无码久久精品| cao超碰网| 少妇高潮颤抖在线| 天天看天天射| 10天的爱人全剧| 精品五月婷| 欧美大尺寸视频| 美女黄色网站在线观看| 精品亚洲国产AV| 夜草草网站| 十八禁真人啪啪999免费网站| 国模 内射| 夜夜毛片| 精品一区二区三区免费毛片爱| 日韩中文字幕A| 色中色天堂老色批视频| 免费日本特黄| 日韩精品一区二区国产| 蜜臀AV天堂| 99精品一区二区三区无码吞精| 人妻精品无码AV毛片| 国产 无码 一区| 亚洲VA中文字幕无码一区| 国产亚洲被窝小说| 大香蕉久久影视视频| 神马久| 久久乐精品免费| 在线观看免费视频无码| 午夜电影网| 大少妇毛片| 无码免费在线观看视频| 亚洲视频一区二区在线观看| 无码天堂| 色悠悠 高清 日本|