|
I had used these method before. Try it should work. Is ODBC connection.
<% ' FileName="Connection_odbc_conn_dsn.htm" ' Type="ADO" ' HTTP="false" ' Catalog="" ' Schema=""
Set objConn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("mydb.mdb")
set objRS = Server.CreateObject("ADODB.Recordset") objRS.ActiveConnection = objConn objRS.Source = "SELECT * TblVeri" objRS.CursorType = 0 objRS.CursorLocation = 2 objRS.LockType = 3 objRS.Open() objRS_numRows = 0 %>
<% Dim HLooper1__numRows HLooper1__numRows = -2 Dim HLooper1__index HLooper1__index = 0 objRS_numRows =objRS_numRows + HLooper1__numRows %>
<head>
</head>
<div> <table border="0" cellspacing="2" cellpadding="2" width="100%"> <tr> <td align="center" valign="middle"> <table width="98%" cellpadding="2" cellspacing="2"> <% startrw = 0 endrw = HLooper1__index numberColumns = 3 'Set numbers columns you want numrows = -1 while((numrows <> 0) AND (Not objRS.EOF)) startrw = endrw + 1 endrw = endrw + numberColumns %> <tr align="center" valign="top"> <% While ((startrw <= endrw) AND (Not objRS.EOF)) %> <td> <table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr align="left" valign="middle"> & ;nbs p; <td width="22"></td> & ;nbs p; <td><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><%=(objRS.Fields.Item("IMAGE_NAME").Value)%></a></font></td> </tr> <tr align="left" valign="middle"> & ;nbs p; <td> </td> & ;nbs p; <td><i><%=(objRS.Fields.Item("IMAGE_DESCRIPTION").Value)%></i></td> </tr> </table></td> <% startrw = startrw + 1 objRS.MoveNext() Wend %> </tr> <% numrows=numrows-1 Wend %> </table></td> </tr> <tr> <td align="center" valign="middle" class="text"></td> </tr> </table> </div> <% objRS.Close() %>
------------- NgWebDesigns
|