al_3asel
05-12-2004, 04:51 AM
hi all,
I created a view page to display all records of the database
but unforetunetly I didn't achieve that. I suggest to make a "next" button but really I don't know how
the code is here
______________________
<HTML><HEAD>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDb1 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("wardialer.mdb")
'Set an active connection to the Connection object using DSN connection
'Create an ADO recordset object
Set rsDb1 = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT table1.* FROM table1;"
'Open the recordset with the SQL query
rsDb1.Open strSQL, adoCon'Loop through the recordset
If (rsDb1.BOF or rsDb1.EOF) Then
Response.Write "No records retrieved."
End If
%>
</HEAD>
<BODY bgColor=#3366cd>
<P align=center><font
color=#ffffff>Please verify if all your info you supplied is correct! If not hit
back and correct.</font></P>
<center>
<table border="1" cellpadding="2" cellspacing="3" width="400">
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>ModemNo :</font></td>
<td ><%=rsDb1("ModemNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>DeptCode :</font></td>
<td ><%=rsDb1("DeptCode")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>DeptName :</font></td>
<td ><%=rsDb1("DeptName")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>CSLNo :</font></td>
<td ><%=rsDb1("CSLNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>Area :</font></td>
<td ><%=rsDb1("Area")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>SiteName :</font></td>
<td ><%=rsDb1("SiteName")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>SiteNo :</font></td>
<td ><%=rsDb1("SiteNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>NC :</font></td>
<td ><%=rsDb1("NC")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>CT :</font></td>
<td ><%=rsDb1("CT")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>IC :</font></td>
<td ><%=rsDb1("IC")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>BU :</font></td>
<td ><%=rsDb1("BU")%> </td>
</tr>
<tr>
<%
'Reset server objects
rsDb1.Close
Set rsDb1 = Nothing
Set adoCon = Nothing
%>
</table>
</center>
</BODY></HTML>
_______________________________
plz I need your help
by posting the fit code.
thanks
I created a view page to display all records of the database
but unforetunetly I didn't achieve that. I suggest to make a "next" button but really I don't know how
the code is here
______________________
<HTML><HEAD>
<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsDb1 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query to query the database
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("wardialer.mdb")
'Set an active connection to the Connection object using DSN connection
'Create an ADO recordset object
Set rsDb1 = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT table1.* FROM table1;"
'Open the recordset with the SQL query
rsDb1.Open strSQL, adoCon'Loop through the recordset
If (rsDb1.BOF or rsDb1.EOF) Then
Response.Write "No records retrieved."
End If
%>
</HEAD>
<BODY bgColor=#3366cd>
<P align=center><font
color=#ffffff>Please verify if all your info you supplied is correct! If not hit
back and correct.</font></P>
<center>
<table border="1" cellpadding="2" cellspacing="3" width="400">
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>ModemNo :</font></td>
<td ><%=rsDb1("ModemNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>DeptCode :</font></td>
<td ><%=rsDb1("DeptCode")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>DeptName :</font></td>
<td ><%=rsDb1("DeptName")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>CSLNo :</font></td>
<td ><%=rsDb1("CSLNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>Area :</font></td>
<td ><%=rsDb1("Area")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>SiteName :</font></td>
<td ><%=rsDb1("SiteName")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>SiteNo :</font></td>
<td ><%=rsDb1("SiteNo")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>NC :</font></td>
<td ><%=rsDb1("NC")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>CT :</font></td>
<td ><%=rsDb1("CT")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>IC :</font></td>
<td ><%=rsDb1("IC")%> </td>
</tr>
<tr>
<td ><font face="Verdana" size="2" color=#ffffff>BU :</font></td>
<td ><%=rsDb1("BU")%> </td>
</tr>
<tr>
<%
'Reset server objects
rsDb1.Close
Set rsDb1 = Nothing
Set adoCon = Nothing
%>
</table>
</center>
</BODY></HTML>
_______________________________
plz I need your help
by posting the fit code.
thanks