针对数据库中表的浏览
小弟不是学asp的
但是现在要用到一些asp的东西
哪位帮帮小弟
针对数据库中表的浏览,写这一小段程序就可以了
多谢多谢
------解决方案--------------------set conn=server.CreateObject( "adodb.connection ")
str= "driver={SQL SERVER};server=127.0.0.1;database=test;uis=sa;pwd=111111 "
conn.open str
set rs=conn.execute( "select * from DEMO ")
for i=0 to rs.fields.count-1
response.write rs(i).name & " "
next
response.write " <BR> "
do while not rs.eof
for i=0 to rs.fields.count-1
response.write rs(i)& " "
next
response.write " <BR> "
rs.movenext
loop
以上打开SQL SERVER数据库;如果是ACCESS数据库,则连接字符串可以使用:
str= "driver={microsoft access driver (*.mdb)};dbq= " & server.mappath(你的数据库文件)