Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Object is closed nel do

    Se scrivo questo passo di programma...

    ---codice---

    Set cn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject("ADODB.Recordset")
    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Inetpub\webs\laugherit\mdb-database\database3.mdb;"

    Do while not rs.eof
    rs.movenext
    Loop

    ---fine codice---

    mi dice che l'operazione non è permessa se l'oggetto è chiuso.

    Cosa manca per farlo girare?

  2. #2

  3. #3
    Ho scritto:

    ---codice---

    Set cn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject("ADODB.Recordset")
    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Inetpub\webs\laugherit\mdb-database\database3.mdb;"

    rs.open sql, cn, 3, 3

    Do while not rs.eof
    rs.movenext
    Loop

    ---fine codice---

    ma mi dice che:

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

  4. #4
    Dopo molteplici tentativi questo va:


    Set cn = Server.CreateObject("ADODB.Connection")
    cn.Provider="Microsoft.Jet.OLEDB.4.0"
    cn.open "Data Source=D:\Inetpub\webs\laugherit\mdb-database\database3.mdb;"
    Set rs = Server.CreateObject("ADODB.Recordset")

    rs.Open "select * from tabella1", cn



    Vado avanti.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.