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

    Problema pagina asp con connessione a database

    Ho una pagina .asp, un database .mdb e un file adojavas.inc ma non mi funziona.
    ho installato ieri office 2010 professional, la versione gratuita in prova di microsoft.
    sapete come posso risolvere?

    questa è la pagina .asp

    <!DOCTYPE HTML PUBLIC
    "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    <html>
    <head>
    <% @ language="JScript" %>

    <%
    var con;
    var conString;
    con = Server.CreateObject("ADODB.Connection");
    conString = "Provider=Microsoft.Jet.OLEDB.4.0; "
    + "Data Source=" +Server.MapPath("auto.mdb");
    con.Open(conString);
    %>
    <title>Esercizio 8.4</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    </head>
    <body>
    <h1> Contenuto database </h1>
    <%
    var rst;
    var sSQLString;
    rst = Server.CreateObject("ADODB.Recordset");
    sSQLString = " Select * from auto_nuove ";
    rst = con.Execute(sSQLString);
    %>

    <table border=1>
    <%
    Response.write("<tr><th>Nome</th><th>Quantit&agrave;</th><th>Costo</th></tr>");
    while (!rst.EOF) {
    Response.write("<tr><td>"+ rst("nome") + "</td> <td>"+ rst("quantita")+"</td> <td>"+ rst("costo")+"</td></tr>");
    rst.MoveNext( );
    }
    rst.Close( );
    con.Close( );
    rst = null;
    con = null;

    %>
    </table>
    </body>
    </html>

    vorrei inoltre chiedere qualcuno sa cos'è il file .ldb che mi è apparso in una cartella di fianco al database?

    quando lo copio in C:\inetpub\wwwroot devo copiare anche il file .ldb o è inutile?

    grazie se risponderete..

  2. #2
    Ho risolto, non so come si elimina la discussione.

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.