16 messaggi dal 18 maggio 2002
Allora dovrei tramite uan query formare una tabella con 3 colonne e riempire le 3 colonne con i record della query

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include virtual="/cartuccie/adovbs.inc"-->
<%
Dim objConn, totaleRecord,iTotalecelle
iTotalecelle=3
Set objConn= Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath("db/store.mdb")
objConn.open
Set prodRS = Server.CreateObject( "ADODB.Recordset" )
sqlString = "SELECT * from Canon where tipo='Kit' and serie LIKE 's %'"
prodRS.Open sqlString,objConn, adOpenKeyset

totaleRecord= prodRS.RecordCount
iPercella=Cint(totaleRecord/iTotalecelle)
%>
<table width="150" border="1" cellspacing="0" cellpadding="0">
<% WHILE NOT prodRS.EOF %>
<tr>
<td> </td>
<td>
<%=prodRS("serie")%>
</td>
<td>
</td>
<td> </td>
</tr>
<%
prodRS.movenext
wend
%>
// chiudo il database .........

Un sito simile ve l'ho fatto vedere
http://www.producers.it/refill-canon.htm

Come faccio a creare una tabella che divide la query in 3 colonne. Sapendo il totale dei record diviso 3 e mettendo un tot per colonna?

Sono agli inizi in asp anche perchè non è proprio la programamzione che prediligo.
3.122 messaggi dal 16 maggio 2002
Intendi questo?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
<!-- #include virtual="/cartuccie/adovbs.inc"--> 
<% 
Dim objConn, totaleRecord,iTotalecelle 
iTotalecelle=3 
Set objConn= Server.CreateObject("ADODB.Connection") 
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.MapPath("db/store.mdb") 
objConn.open 
Set prodRS = Server.CreateObject( "ADODB.Recordset" ) 
sqlString = "SELECT * from Canon where tipo='Kit' and serie LIKE 's %'" 
prodRS.Open sqlString,objConn, adOpenKeyset 

totaleRecord= prodRS.RecordCount 
iPercella=Cint(totaleRecord/iTotalecelle) 
%> 
<table width="150" border="1" cellspacing="0" cellpadding="0"> 
<%
WHILE NOT prodRS.EOF
Response.Write "<tr>"
for i=1 to iTotaleCelle
Response.Write "<td>"
if prodRS.EOF then
Response.Write "&nbsp;"
else
Response.Write prodRS("serie")
prodRS.MoveNext
end if
Response.Write "</td>"
next
Response.Write "</tr>"
wend
' chiudo il database .........
%>

.. asp .. non è proprio la programamzione che prediligo.

Pure io. Preferisco php e C ;)
Modificato da Raynor il 24 settembre 2004 09.24 -

The day Microsoft makes something that doesn't suck
is probably the day they start making vacuum cleaners.

Get caught!
Get caught again!

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.