Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 18 su 18

Discussione: File txt

  1. #11
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584

    Re: Sono un disastro

    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.
    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

  2. #12
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584
    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

  3. #13
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    102

    Funzionaaaaaaaaaaaaaaaaa!

    L'errore non era quello dopo un tot di tentativi, vaaaaaaaaa
    Grazie

  4. #14
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    102

    Non è finita

    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
    ----------

  5. #15
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    102

    Versione più corretta

    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

  6. #16
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    102

    Qualcuno può aiutarmi?

    Grazie

  7. #17
    Utente di HTML.it L'avatar di Corwin
    Registrato dal
    Jan 2002
    Messaggi
    584
    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

  8. #18
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    102

    Risolto tutto no problem

    grazie a tutti

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.