Prova a postare un paio di righe del file reale, se puoi.Originariamente inviato da francy_eb
Mi da questo errore
Opzione Col1 non valida nella specifica del file di testo 'AUTO.TXT'.
/auto/categorie.asp, line 24
Prova a postare un paio di righe del file reale, se puoi.Originariamente inviato da francy_eb
Mi da questo errore
Opzione Col1 non valida nella specifica del file di testo 'AUTO.TXT'.
/auto/categorie.asp, line 24
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
Uh, per fare uscire l'errore che esce a te ho dovuto scrivere:
[auto.txt]
Format=Delimited(> )
ColNameHeader=False
Col1=categoriatext
Sicuro di aver scritto il file correttamente ?
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
L'errore non era quello dopo un tot di tentativi, vaaaaaaaaa
Grazie
Adesso solo al punto in cui riesco a recuperare i dati che mi servono, ma dovrei fare in modo una volta ottenuta la categoria stampare tutte le sottocategorie relative ad essa, ecco il mio codice:
-----------------
' Mi recupero le Categorie
strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".") & ";Extended Properties=""text;"""
set conn = server.createobject("ADODB.Connection")
set rs = server.createobject("ADODB.Recordset")
conn.open strProvider
sql = "SELECT DISTINCT CATEGORIA FROM auto.txt"
rs.open sql, conn
While not rs.eof
StrCat = rs("categoria")
set conn = server.createobject("ADODB.Connection")
set rsSotCat = server.createobject("ADODB.Recordset")
conn.open strProvider
sqlSotCat = "SELECT SOTTOCATEGORIA FROM AUTO.TXT WHERE CATEGORIA='" & StrCat & "'"
rsSotCat.open sqlSotCat, conn
While rsSotCat.eof
StrSotCat = rsSotCat("sottocategoria")
Response.Write (StrCat & "
<a href=link.asp?cat="& StrCat & "&sotcat=" & StrSotCat & ">" & StrSotCat & ",")
rsSotCat.eof
Wend
rs.Movenext
Wend
----------
strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".") & ";Extended Properties=""text;"""
set conn = server.createobject("ADODB.Connection")
set rs = server.createobject("ADODB.Recordset")
conn.open strProvider
sql = "SELECT DISTINCT CATEGORIA FROM auto.txt"
rs.open sql, conn
While not rs.eof
StrCat = rs("categoria")
set conn = server.createobject("ADODB.Connection")
set rsSotCat = server.createobject("ADODB.Recordset")
conn.open strProvider
sqlSotCat = "SELECT SOTTOCATEGORIA FROM AUTO.TXT WHERE CATEGORIA='" & StrCat & "'"
rsSotCat.open sqlSotCat, conn
StrSotCat = rsSotCat("sottocategoria")
Response.Write (StrCat & "
<a href=link.asp?cat="& StrCat & "&sotcat=" & StrSotCat & ">" & StrSotCat & ",")
rs.Movenext
Wend
Grazie
Scusa ma non riesco a capire dove sia il problema nel tuo codice... :master:
I don't wanna have to shout it out / I don't want my hair to fall out
I don't wanna be filled with doubt / I don't wanna be a good boy scout
I don't wanna have to learn to count / I don't wanna have the biggest amount
I don't wanna grow up
grazie a tutti