|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
想法是和程序员的想法不一样的.至于为什么.大家去想一想.跟心理学有关的oracle|server<%Response.CharSet="gb2312"
tblname=request("tb")
DimobjOraSession,objOraDb
DimstrDbUser,strDbPwd,strDbConn
CallConnectDB()
SubConnectDB()毗连数据库
OnErrorResumeNext
strDbUser="liujincai"毗连用户名
strDbPwd="ljc1001"用户暗码
strDbConn="hp1"毗连字符串
SetobjOraSession=Server.CreateObject("OracleInProcServer.XOraSession")
SetobjOraDB=objOraSession.OpenDatabase(strDbConn,strDbUser&"/"&strDbPwd,0)
IfErr.Number>0then
Response.Write"毛病:"&err.description&""
response.end
Endif
EndSub
SubEndDB()
SetobjOraDB=Nothing
SetobjOraSession=Nothing
EndSub
FunctiongetTableList(str)
DimstrSql,strTmp
DimobjRs
strSql="Selectat.table_nameastname,au.usernameasunamefromall_tablesat,all_usersauWhereau.username=at.ownerorderbyau.username"
SetobjRs=objOraDb.DbCreateDynaset(strSql,0)
WhileNotobjRs.Eof
strA=objRs("uname")&"."&objRs("tname")
Ifstr=strAthen
strTmp=strTmp&""&strA&""
Else
strTmp=strTmp&""&strA&""
Endif
objRs.MoveNext
Wend
SetobjRs=Nothing
getTableList=strTmp
EndFunction
%>
<formname=form1action="aa.asp"method=POSTtarget="main">
<tablewidth="100%"border=0align="center">
<tr><td>
AllTables:<selectname="tb">
<%=getTableList(tblName)%>
</select>
<inputtype=hiddenname="submitc"value="view">
<inputtype=submitname="submit"value="ViewData">
<fontcolor=red>(<%=strDbUser&"/"&strDbPwd&"@"&strDbConn%>)</font>
</td></tr>
</table>
</form>
<tableborder=1cellspacing=0>
<%
iftblname""then
strSql="Select*from"&tblname
SetRs=objOraDb.DbCreateDynaset(strSql,0)
Response.Write"<tr>"
fori=0tors.Fields.count-1
Response.Write"<td>"&rs.fields(i).name&"</td>"
next
Response.Write"</tr>"
WhileNotRs.Eof
Response.Write"<tr>"
fori=0tors.fields.count-1
Response.Write"<td>"&Rs.Fields(i).Value&"</td>"
next
Response.Write"</tr>"
Rs.MoveNext
Wend
SetRs=Nothing
endif
%>
</table>
细节可查询
http://www.jojoo.net/article/list.asp?id=4101
http://www.cx66.com/cxgzs/program/asp/581.htm
http://www.51one.net/info/1797.htm
http://www.kupage.com/webdesign/7/20031017/1641380000027pjtnjgy.htm
</p>国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了 |
|