Newsgroup: it.comp.www.asp
Titolo: problema con asp + database.

ho un problema quando lancio il file che ho messo nella cartella di wwwroot,
mi segnala il seg error.non ho capito cosa devo fare, aitatemi.
REGITRAZIONE
data titolo msg login
Database Results Error
The database connection named 'miodb' is undefined.
This problem can occur if:
* the connection has been removed from the web
* the file 'global.asa' is missing or contains errors
* the root folder does not have Scripting permissions enabled
* the web is not marked as an Application Root
codice generato in automatico con f.page2000
<html>
<head>
<title>Home page</title>
</head>
<body>
<center><a href="registrazione.asp" class="link"><font
size="+4">REGITRAZIONE</font></a></font></center>
<br><br>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>data</b></td>
      <td><b>titolo</b></td>
      <td><b>msg</b></td>
      <td><b>login</b></td>
    </tr>
  </thead>
  <tbody>
    <!--webbot bot="DatabaseRegionStart" startspan
    s-columnnames="data,titolo,msg,login" s-columntypes="135,202,203,202"
    s-dataconnection="miodb" b-tableformat="TRUE" b-menuformat="FALSE"
    s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
    b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
    i-ListFormat="0" b-makeform="TRUE" s-recordsource
    s-displaycolumns="data,titolo,msg,login" s-criteria s-order
    s-sql="SELECT msgs.data, msgs.titolo, msgs.msg, msgs.login&lt;br&gt;FROM
msgs;&lt;br&gt;"
    b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields
    s-NoRecordsFound="Nessun record restituito." i-MaxRecords="256"
    i-GroupSize="5" BOTID="0" u-dblib="_fpclass/fpdblib.inc"
    u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc"
    tag="TBODY"
    local_preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;Per visualizzare l'anteprima di un'area
risultati database è necessario accedere alla pagina connettendosi al server
Web tramite browser. La riga seguente verrà ripetuta per ciascun record
restituito dalla query.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;"
    preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;Inizio dell'area risultati database. Affinché
sia possibile utilizzare l'area risultati database è necessario salvare la
pagina con estensione .asp. Per visualizzare correttamente l'area risultati
database è necessario accedere alla pagina connettendosi al server Web
tramite browser. Il Web corrente è memorizzato nella rete o in un disco
locale.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include
file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT msgs.data, msgs.titolo, msgs.msg, msgs.login FROM msgs; "
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=4 align=left width=""100%"">Nessun record
restituito.</td></tr>"
fp_sDataConn="miodb"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=4
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" I-CheckSum="51615" endspan -->
    <tr>
      <td><!--webbot bot="DatabaseResultColumn" startspan
        s-columnnames="data,titolo,msg,login" s-column="data"
        b-tableformat="TRUE" b-hasHTML="FALSE" clientside
        local_preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;data&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
        preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;data&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" --><%=FP_FieldVal(fp_r
s,"data")%><!--webbot
        bot="DatabaseResultColumn" I-CheckSum="5307" endspan -->
      </td>
      <td><!--webbot bot="DatabaseResultColumn" startspan
        s-columnnames="data,titolo,msg,login" s-column="titolo"
        b-tableformat="TRUE" b-hasHTML="FALSE" clientside
        local_preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;titolo&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
        preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;titolo&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" --><%=FP_FieldVal(fp_r
s,"titolo")%><!--webbot
        bot="DatabaseResultColumn" I-CheckSum="17823" endspan -->
      </td>
      <td><!--webbot bot="DatabaseResultColumn" startspan
        s-columnnames="data,titolo,msg,login" s-column="msg"
        b-tableformat="TRUE" b-hasHTML="FALSE" clientside
        local_preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;msg&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
        preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;msg&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" --><%=FP_FieldVal(fp_r
s,"msg")%><!--webbot
        bot="DatabaseResultColumn" I-CheckSum="6460" endspan -->
      </td>
      <td><!--webbot bot="DatabaseResultColumn" startspan
        s-columnnames="data,titolo,msg,login" s-column="login"
        b-tableformat="TRUE" b-hasHTML="FALSE" clientside
        local_preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;login&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
        preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;login&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" --><%=FP_FieldVal(fp_r
s,"login")%><!--webbot
        bot="DatabaseResultColumn" I-CheckSum="11094" endspan -->
      </td>
    </tr>
    <!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
    b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5"
    clientside tag="TBODY"
    local_preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;Fine dell'area risultati database.&lt;/font&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD ALIGN=LEFT VALIGN=MIDDLE
COLSPAN=64&gt;&lt;FORM&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot;
|&lt;  &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;   &lt;
&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;  &gt;   &quot;&gt;&lt;INPUT
TYPE=Button VALUE=&quot;  &gt;|  &quot;&gt;
[1/5]&lt;/NOBR&gt;&lt;/FORM&gt;&lt;/td&gt;&lt;/tr&gt;"
    preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;
align=&quot;left&quot; width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;Fine dell'area risultati
database.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD ALIGN=LEFT
VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot;
|&lt;  &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;   &lt;
&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot;  &gt;   &quot;&gt;&lt;INPUT
TYPE=Button VALUE=&quot;  &gt;|  &quot;&gt;
[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include
file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" I-CheckSum="62730" endspan -->
  </tbody>
</table>
</body>
</html>

codice generato in automatico con f.page2000
Lo guardero', intanto guarda quanto sopra.
Un esempio di global.asa praticamente vuoto
<script language="vbscript" runat=server>
Sub Application_OnStart
	' Qui metti definizioni per tutta l'applicazione
End Sub
Sub Session_OnStart
	' Qui metti definizioni per le sessioni
End Sub
</script>