How to use ASP & Oracle Display Multiple Column This is tutorial asp developers how to using ASP list data from Oracle table and display result of multiple column.
ShotDev Focus:
- ASP & Oracle list data and multiple column.
Example
asp_oracle_column.asp
<% Option Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
Dim Conn,strSQL,objRec,intRows
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={Oracle in OraHome92};DBQ=TCDB;UID=myuser;PWD=mypassword;"
strSQL = "SELECT * FROM GALLERY "
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open strSQL, Conn, 1,3
Response.Write("<table border='0' cellspacing='1' cellpadding='1'><tr>")
intRows = 0
While Not objRec.EOF
intRows = intRows + 1
Response.Write("<td>")
%>
<center>
<img src="shotdev/<%=objRec.Fields("PICTURE").Value%>"><br>
<%=objRec.Fields("GALLERYNAME").Value%>
<br>
</center>
<%
Response.Write("</td>")
If intRows Mod 2 = 0 Then
Response.Write("</tr>")
End If
objRec.MoveNext
Wend
Response.Write("</tr></table>")
objRec.Close()
Conn.Close()
Set objRec = Nothing
Set Conn = Nothing
%>
</body>
</html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_oracle_column.asp
Screenshot



2allowing…
…