e value='<%=DbName%>'>
<input type=hidden name=CurrentDb value='<%=DbName%>'>
<input type=hidden name='TbId' value='<%=TbId%>'>
<table border=1 bordercolor=#5f5f5f bgcolor=#cfcfcf cellpadding=3 cellspacing=0>
<tr bgcolor=<%=trColor%>><th>Nn</th><th>Name</th><th>Type</th><th>length</th>
<th>precision</th><th>scale</th><th>default value</th><th>properties</th><th>relation</th></tr>
<%
for( TrColor= ', i= 1; !Rs.EOF; i++, Rs.MoveNext()){
if( trColor== trColor1) trColor= trColor2;
else trColor= trColor1;
%>
<tr bgcolor=<%=trColor%>>
<td bgcolor=<%=trColor2%> align=right><b><%=i%></b></td><td>
<%=Rs( 0)%></td>
<td align=right> <%=Rs( 1)%></td>
<td align=right> <%=Rs( 2)%></td>
<%
if( Rs( 1)== 'numeric'|| Rs( 1)== 'decimal'){
prec= Rs( 3);
scale= Rs( 4);
} else prec= scale= ' ';
colstat= "";
if( Rs( 7)== 1) colstat+= ", Identity";
if( Rs( 5)== 1) colstat+= ", Primary Key";
if( Rs( 6)== 1) colstat+= ", Nullable";
if( colstat== "")
colstat= " ";
else
colstat= colstat.substring( 2);
cdefault= Rs( 8);
if( !isDef( cdefault)) cdefault= " ";
else {
cdefault= ""+ cdefault;
cdefault= cdefault.substring( 1, cdefault.length- 1);
}
foreign= Rs( 9);
if( !isDef( foreign)) foreign= " ";
%>
<td align=right><%=prec%></td><td><%=scale%></td>
<td><%=cdefault%></td><td><%=colstat%></td><td><%=foreign%></td>
</tr>
<%
}
%>
</table>
<%
}
if( isDef( Tbl)){
Response.Write( "<font color=white><b>"+ Tbl+ "</b></font></a><br> ");
Rs= Conn.Execute( "select count( *) from "+ Tbl);
RecordCount= Rs( 0);
Response.Write( "<font color=white>"+ RecordCount+ " Records total</font><br>");
Rs= Conn.Execute( "select * from "+ Tbl);
if( !isDef( Row))
Row= 0;
if( !Rs.EOF)
Rs.Move( Row);
%>
<table bgcolor=#9fbfcf border=1 cellpadding=1 cellspacing=0><tr bgcolor=#cfcfcf><th>N/n</th>
<%
var ColCount= Rs.Fields.Count;
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<th>"+ Rs.Fields( i1).Name+ "</th>");
Response.Write( "</tr> ");
Prev= Row- PgSize;
if( Prev< 0&& Row> 0) Prev= 0;
for( i= Row+ 1, Cntr= 0;
Cntr< PgSize&& !Rs.EOF;
Rs.MoveNext(), i++, Cntr++
){
if( trColor== trColor1) trColor= trColor2;
else trColor= trColor1;
%>
<tr bgcolor=<%=trColor%>>
<td bgcolor=<%=trColor2%> align=right><b><%=i%></b></td>
<%
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<td>"+ Rs.Fields( i1).Value+ "</td>");
Response.Write( "</tr> ");
}
if( Cntr> 0){
Response.Write( "<tr bgcolor=#cfcfcf><th>N/n</th>");
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<th>"+ Rs.Fields( i1).Name+ "</th>");
Response.Write( "</tr> ");
}
Response.Write( "</table> <table width='50%' border=0>");
if( Prev>= 0){
QS= new String( Request.QueryString);
Prev= QS.substring( 0, QS.lastIndexOf( "=")+ 1)+ Prev;
Response.Write( "<td><a href='TbStru.asp?"+ Prev+ "'><font color=white><b><< Previous</a> </b></font></td> ");
}
if( !Rs.EOF){
QS= new String( Request.QueryString);
if( QS.lastIndexOf( "&Row=")+ 1)
Next= QS.substring( 0, QS.lastIndexOf( "=")+ 1)+ ( i- 1);
else
Next= QS+ "&Row="+ ( i- 1);
Response.Write( "<td align=right><a href='TbStru.asp?"+ Next+ "'><font color=white><b>Next >></b></font></a></td> ");
}
Response.Write( "</table>");
}
%>
<input type=hidden name=CurrentDb value='<%=DbName%>'>
<input type=hidden name='TbId' value='<%=TbId%>'>
<table border=1 bordercolor=#5f5f5f bgcolor=#cfcfcf cellpadding=3 cellspacing=0>
<tr bgcolor=<%=trColor%>><th>Nn</th><th>Name</th><th>Type</th><th>length</th>
<th>precision</th><th>scale</th><th>default value</th><th>properties</th><th>relation</th></tr>
<%
for( TrColor= ', i= 1; !Rs.EOF; i++, Rs.MoveNext()){
if( trColor== trColor1) trColor= trColor2;
else trColor= trColor1;
%>
<tr bgcolor=<%=trColor%>>
<td bgcolor=<%=trColor2%> align=right><b><%=i%></b></td><td>
<%=Rs( 0)%></td>
<td align=right> <%=Rs( 1)%></td>
<td align=right> <%=Rs( 2)%></td>
<%
if( Rs( 1)== 'numeric'|| Rs( 1)== 'decimal'){
prec= Rs( 3);
scale= Rs( 4);
} else prec= scale= ' ';
colstat= "";
if( Rs( 7)== 1) colstat+= ", Identity";
if( Rs( 5)== 1) colstat+= ", Primary Key";
if( Rs( 6)== 1) colstat+= ", Nullable";
if( colstat== "")
colstat= " ";
else
colstat= colstat.substring( 2);
cdefault= Rs( 8);
if( !isDef( cdefault)) cdefault= " ";
else {
cdefault= ""+ cdefault;
cdefault= cdefault.substring( 1, cdefault.length- 1);
}
foreign= Rs( 9);
if( !isDef( foreign)) foreign= " ";
%>
<td align=right><%=prec%></td><td><%=scale%></td>
<td><%=cdefault%></td><td><%=colstat%></td><td><%=foreign%></td>
</tr>
<%
}
%>
</table>
<%
}
if( isDef( Tbl)){
Response.Write( "<font color=white><b>"+ Tbl+ "</b></font></a><br> ");
Rs= Conn.Execute( "select count( *) from "+ Tbl);
RecordCount= Rs( 0);
Response.Write( "<font color=white>"+ RecordCount+ " Records total</font><br>");
Rs= Conn.Execute( "select * from "+ Tbl);
if( !isDef( Row))
Row= 0;
if( !Rs.EOF)
Rs.Move( Row);
%>
<table bgcolor=#9fbfcf border=1 cellpadding=1 cellspacing=0><tr bgcolor=#cfcfcf><th>N/n</th>
<%
var ColCount= Rs.Fields.Count;
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<th>"+ Rs.Fields( i1).Name+ "</th>");
Response.Write( "</tr> ");
Prev= Row- PgSize;
if( Prev< 0&& Row> 0) Prev= 0;
for( i= Row+ 1, Cntr= 0;
Cntr< PgSize&& !Rs.EOF;
Rs.MoveNext(), i++, Cntr++
){
if( trColor== trColor1) trColor= trColor2;
else trColor= trColor1;
%>
<tr bgcolor=<%=trColor%>>
<td bgcolor=<%=trColor2%> align=right><b><%=i%></b></td>
<%
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<td>"+ Rs.Fields( i1).Value+ "</td>");
Response.Write( "</tr> ");
}
if( Cntr> 0){
Response.Write( "<tr bgcolor=#cfcfcf><th>N/n</th>");
for( i1= 0; i1< ColCount; i1++)
Response.Write( "<th>"+ Rs.Fields( i1).Name+ "</th>");
Response.Write( "</tr> ");
}
Response.Write( "</table> <table width='50%' border=0>");
if( Prev>= 0){
QS= new String( Request.QueryString);
Prev= QS.substring( 0, QS.lastIndexOf( "=")+ 1)+ Prev;
Response.Write( "<td><a href='TbStru.asp?"+ Prev+ "'><font color=white><b><< Previous</a> </b></font></td> ");
}
if( !Rs.EOF){
QS= new String( Request.QueryString);
if( QS.lastIndexOf( "&Row=")+ 1)
Next= QS.substring( 0, QS.lastIndexOf( "=")+ 1)+ ( i- 1);
else
Next= QS+ "&Row="+ ( i- 1);
Response.Write( "<td align=right><a href='TbStru.asp?"+ Next+ "'><font color=white><b>Next >></b></font></a></td> ");
}
Response.Write( "</table>");
}
%>