Buongiorno a tutti,
come sempre vi disturbo chiedendo l'ennesimo aiuto
Avrei la necessità di estrarre dei record in modo orrivontale e verticale, e cosi ho trovato qyesto bellissimo codice, ma:
' DEFINISCO LE VARIABILI CHE MI SERVONO PER L'APPLICAZIONE
Dim sc, cn, rs, contatore
' DEFINISCO LA STRINGA DI CONNESSIONE
sc = ""
sc = sc & "driver={Microsoft Access Driver (*.mdb)};dbq="
sc = sc & Server.MapPath("prodotti.mdb")
' IMPOSTO LA CONNESSIONE ED IL RECORDSET
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
' APRO LA CONNESSIONE COL DATABASE
cn.Open sc
%>
<html>
<head>
<title>Paginazione a colonne sui record di un db in ASP</title>
</head>
<body>
<table border="1"><tr>
<%
' IMPOSTO A 0 IL CONTATORE
contatore = 0
' APRO IL RECORDSET
rs.Open "SELECT nome_dxf FROM dxf ORDER BY id ASC", cn, 1
' ESEGUO IL CICLO
While rs.EOF = False
' IMPOSTO LA PAGINAZIONE A 3 COLONNE ED N RIGHE
' IN FUNZIONE DEL NUMERO DI RECORD PRESENTI NEL DB
If contatore = 10 Then
contatore = 0
Response.Write "</tr><tr>"
End If
%>
<td><%=rs("nome_dxf")%></td>
<%
rs.MoveNext
' INCREMENTO IL VALORE DEL CONTATORE
contatore = contatore + 1
Wend
rs.Close
%>
___________________
e qui chiedo aiuto, in questo modo vedo tutti i record dentro la tabella.
Se nella mia tabella esiste un campo tipo, potrei strarre i record in base alla tabella tipo?
Cosi facendo da un bottone (il richiamo del tasto con il codice dxf.asp?tipo=A) estrarrei il tipo A, il tipo B ecc ecc?
E una volta estratto i codici, come posso farli diventare link?
o meglio scusate la mia non conoscenza della material, dove devo mettere a href?
grazie
come sempre vi disturbo chiedendo l'ennesimo aiuto
Avrei la necessità di estrarre dei record in modo orrivontale e verticale, e cosi ho trovato qyesto bellissimo codice, ma:
' DEFINISCO LE VARIABILI CHE MI SERVONO PER L'APPLICAZIONE
Dim sc, cn, rs, contatore
' DEFINISCO LA STRINGA DI CONNESSIONE
sc = ""
sc = sc & "driver={Microsoft Access Driver (*.mdb)};dbq="
sc = sc & Server.MapPath("prodotti.mdb")
' IMPOSTO LA CONNESSIONE ED IL RECORDSET
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
' APRO LA CONNESSIONE COL DATABASE
cn.Open sc
%>
<html>
<head>
<title>Paginazione a colonne sui record di un db in ASP</title>
</head>
<body>
<table border="1"><tr>
<%
' IMPOSTO A 0 IL CONTATORE
contatore = 0
' APRO IL RECORDSET
rs.Open "SELECT nome_dxf FROM dxf ORDER BY id ASC", cn, 1
' ESEGUO IL CICLO
While rs.EOF = False
' IMPOSTO LA PAGINAZIONE A 3 COLONNE ED N RIGHE
' IN FUNZIONE DEL NUMERO DI RECORD PRESENTI NEL DB
If contatore = 10 Then
contatore = 0
Response.Write "</tr><tr>"
End If
%>
<td><%=rs("nome_dxf")%></td>
<%
rs.MoveNext
' INCREMENTO IL VALORE DEL CONTATORE
contatore = contatore + 1
Wend
rs.Close
%>
___________________
e qui chiedo aiuto, in questo modo vedo tutti i record dentro la tabella.
Se nella mia tabella esiste un campo tipo, potrei strarre i record in base alla tabella tipo?
Cosi facendo da un bottone (il richiamo del tasto con il codice dxf.asp?tipo=A) estrarrei il tipo A, il tipo B ecc ecc?
E una volta estratto i codici, come posso farli diventare link?
o meglio scusate la mia non conoscenza della material, dove devo mettere a href?
grazie