Visualizzazione dei risultati da 1 a 8 su 8

Discussione: mismatch

  1. #1

    mismatch

    ciao ragazzi che significa questo errore?
    Microsoft VBScript runtime error '800a000d'

    Type mismatch: 'RSBODY'

    /guestbook/default2.asp, line 301

  2. #2
    up

  3. #3
    Utente di HTML.it L'avatar di Baol74
    Registrato dal
    Jul 2002
    Messaggi
    2,004
    Type mismatch = Tipo Sbagliato

  4. #4
    ciao baol,
    il problema è uscito fuori in questo modo:
    ho lo script in asp di un calendario, e volevo inserirlo in una pag a sua volta in asp, solo che quando lo inserisco mi da quell errore...
    da cosa potrebbe dipendere?
    posso postare i codici?

  5. #5
    Utente di HTML.it L'avatar di Baol74
    Registrato dal
    Jul 2002
    Messaggi
    2,004
    Asp si aspetta che RSBODY sia un recordset. Per qualche ragione non viene creato.

    Posta il codice

  6. #6
    codice da inserire:


    <html>
    <head>
    <title><%=RSBODY("Page_Title")%></title>



    </head>
    <body bgcolor="<%=RSBODY("Background_Color")%>" text="<%=RSBODY("Font_Color")%>" link="<%=RSBODY("Link_Color")%>" vlink="<%=RSBODY("Visited_Link_Color")%>" alink="<%=RSBODY("Active_Link_Color")%>">

    <%

    navmonth = request.querystring("month")
    navyear = request.querystring("year")

    If navmonth = "" Then
    navmonth = Month(Date)
    End If

    If navyear = "" Then
    navyear = Year(Date)
    End If

    firstday = Weekday(CDate(navmonth & "/" & 1 & "/" & navyear))


    leapTestNumbers = navyear / 4
    leapTest = (leapTestNumbers) - Round(leapTestNumbers)
    If navmonth = 2 Then
    If leapTest <> 0 Then
    lastDate = 28
    Else
    lastDate = 29
    End If
    ElseIf ((navmonth = 4) OR (navmonth = 6) OR (navmonth = 9) OR (navmonth = 11)) Then
    lastDate = 30
    Else
    lastDate = 31
    End If

    lastMonth = navmonth - 1
    lastYear = navyear
    If lastMonth < 1 Then
    lastMonth = 12
    lastYear = lastYear - 1
    End If

    nextMonth = navmonth + 1
    nextYear = navyear
    If nextMonth >12 Then
    nextMonth = 1
    nextYear = nextYear + 1
    End If


    dateCounter = 1
    weekCount = 1

    DateEnd = lastDate
    DateBegin = firstDate

    Weekday_Font = RSBODY("Weekday_Font")
    Weekday_Font_Size = RSBODY("Weekday_Font_Size")
    Weekday_Font_Color = RSBODY("Weekday_Font_Color")
    Weekday_Background_Color = RSBODY("Weekday_Background_Color")
    Date_Font = RSBODY("Date_Font")
    Date_Font_Size = RSBODY("Date_Font_Size")
    Date_Font_Color = RSBODY("Date_Font_Color")
    Date_Background_Color = RSBODY("Date_Background_Color")
    Event_Font = RSBODY("Event_Font")
    Event_Font_Size = RSBODY("Event_Font_Size")
    Event_Font_Color = RSBODY("Event_Font_Color")
    Cell_Width = RSBODY("Cell_Width")
    Cell_Height = RSBODY("Cell_Height")
    Cell_Background_Color = RSBODY("Cell_Background_Color")
    Border_Size = RSBODY("Border_Size")
    Border_Color = RSBODY("Border_Color")
    %>

    <%=RSBODY("Header")%>

    <table border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
    <td align="center">

    <table border="0" cellpadding="2" cellspacing="0" width="100%">
    <tr>
    <td align="left" valign="bottom"><font face="arial" size="2"><%If (RSBODY("Abbreviate_Months") = True) Then%><%=MonthName(lastMonth, true)%><%Else%><%=MonthName(lastMonth)%><%End If%></font></td>
    <td align="center" valign="bottom"><font face="arial" size="4"><%If (RSBODY("Abbreviate_Months") = True) Then%><%=MonthName(navMonth, true)%><%Else%><%=MonthName(navMonth)%><%End If%><%=navyear%></font></td>
    <td align="right" valign="bottom"><font face="arial" size="2"><%If (RSBODY("Abbreviate_Months") = True) Then%><%=MonthName(nextMonth, true)%><%Else%><%=MonthName(nextMonth)%><%End If%></font></td>
    </tr>
    </table>

    </td>
    </tr>
    <tr>
    <td>

    <table border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
    <td bgcolor="<%=Border_Color%>">

    <table border="0" cellpadding="2" cellspacing="<%=Border_Size%>">
    <tr>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Dom<%Else%>Domenica<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Lun<%Else%>Lunedì<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Mar<%Else%>Martedì<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Mer<%Else%>Mercoledì<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Gio<%Else%>Giovedì<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Ven<%Else%>Venerdì<%End If%></font></td>
    <td width="<%=Cell_Width%>" align="center" bgcolor="<%=Weekday_Background_Color%>"><font face="<%=Weekday_Font%>" size="<%=Weekday_Font_Size%>" color="<%=Weekday_Font_Color%>"><%If (RSBODY("Abbreviate_Days") = True) Then%>Sab<%Else%>Sabato<%End If%></font></td>
    </tr>


    <tr>
    <% Do while weekCount <= 7
    dateSelect = navmonth & "/" & dateCounter & "/" & navyear %>

    <% If (weekCount < firstDay) OR (dateCounter > lastDate) Then %>
    <td height="<%=Cell_Height%>" bgcolor="<%=Cell_Background_Color%>">[img]im/clear.gif[/img]</td>
    <% else %>
    <td height="<%=Cell_Height%>" bgcolor="<%=Date_Background_Color%>" valign="top"><a href="date.asp?date=<%=dateSelect%>"><font face="<%=Date_Font%>" size="<%=Date_Font_Size%>" color="<%=Date_Font_Color%>"><%=dateCounter%></font><font face="<%=Event_Font%>" size="<%=Event_Font_Size%>" color="<%=Event_Font_Color%>">

    <%
    Set RSEVENT = Server.CreateObject("ADODB.RecordSet")
    RSEVENT.Open "SELECT * FROM Events", Conn, 1, 3

    Do while NOT RSEVENT.EOF
    rsdate = RSEVENT("Date")
    If (Day(rsdate) = dateCounter) AND (Month(rsdate) = CInt(navmonth)) AND (Year(rsdate) = CInt(navyear)) Then%>



    <%If RSBODY("Event_Display") = True Then%>
    <%=RSEVENT("Category")%>
    <%Else%>
    <%=RSEVENT("Event_Name")%>
    <% End If

    End If
    RSEVENT.movenext
    Loop
    RSEVENT.close
    %>

    </font></a></td>

    <%
    dateCounter = dateCounter + 1
    end if

    weekCount = weekCount + 1
    Loop
    weekCount = 1
    %>
    </tr>
    <% Do while dateCounter <= lastDate %>
    <tr>
    <% Do while weekCount <= 7
    dateSelect = navmonth & "/" & dateCounter & "/" & navyear %>

    <% If dateCounter > lastDate Then %>
    <td height="<%=Cell_Height%>" bgcolor="<%=Cell_Background_Color%>">[img]im/clear.gif[/img]</td>
    <% else %>
    <td height="<%=Cell_Height%>" bgcolor="<%=Date_Background_Color%>" valign="top"><a href="date.asp?date=<%=dateSelect%>"><font face="<%=Date_Font%>" size="<%=Date_Font_Size%>" color="<%=Date_Font_Color%>"><%=dateCounter%></font><font face="<%=Event_Font%>" size="<%=Event_Font_Size%>" color="<%=Event_Font_Color%>">

    <%
    Set RSEVENT = Server.CreateObject("ADODB.RecordSet")
    RSEVENT.Open "SELECT * FROM Events", Conn, 1, 3
    Do while NOT RSEVENT.EOF
    rsdate = RSEVENT("Date")
    If (Day(rsdate) = dateCounter) AND (Month(rsdate) = CInt(navmonth)) AND (Year(rsdate) = CInt(navyear)) Then%>



    <%If RSBODY("Event_Display") = True Then%>
    <%=RSEVENT("Category")%>
    <%Else%>
    <%=RSEVENT("Event_Name")%>
    <% End If

    End If
    RSEVENT.movenext
    Loop
    RSEVENT.close
    %>

    </font></a></td>

    <%
    dateCounter = dateCounter + 1
    end if

    weekCount = weekCount + 1
    Loop
    weekCount = 1
    %>
    </tr>
    <% Loop %>




    </table>

    </td>
    </tr>
    </table>

    </td>
    </tr>

    <tr>
    <td align="center"></td>
    </tr>


    </table>

    <%=RSBODY("Footer")%>

    </body>
    </html>

  7. #7
    pag contenitore

    <%nome_pagina="homepage"%>

    <%
    on error resume next
    Dim nomefile, filestream
    nomefile = Server.MapPath("/_private/contatore.txt")
    Set objFile = CreateObject("Scripting.FileSystemObject")

    'se il file non esiste, crealo
    if not objFile.FileExists(nomefile) then
    Set filestream = objFile.OpenTextFile(nomefile, 2, true)
    filestream.WriteLine("0")
    end if

    'legge il numero attuale di visite
    Set filestream = objFile.OpenTextFile(nomefile, 1, true)
    Dim visite
    visite = filestream.ReadLine()
    filestream.Close

    'se non è ancora presente la variabile di sessione
    if Session("visiting")<>1 then
    Session("visiting") = 1 'crea la variabile di sessione
    visite = visite + 1 'incrementa di uno gli accessi al sito
    end if

    'scrive nel file il valore aggiornato di visite
    Set filestream = objFile.CreateTextFile(nomefile, true)
    filestream.WriteLine(visite)
    filestream.Close

    Set filestream = Nothing
    Set objFile = Nothing

    'visualizza sul browser il numero totale di visite
    'Response.Write "Numero visite: " &visite
    %>

    <%
    on error resume next
    if Session("trace") <> 1 Then
    Session("trace") = 1 'crea la variabile di sessione per non far riscrivere più volte se è lo stesso visitatore...

    Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
    traceFile = Server.MapPath ("/_private") & "\trace.txt"
    Set OutStream = FileObject.OpenTextFile(traceFile,8,true)
    OutputString1 = "IP Remoto = "+Request.ServerVariables("REMOTE_ADDR")
    OutputString2 = "Proviene da : "+Request.ServerVariables("HTTP_REFERER")
    OutputString3 = now()
    OutputString4 = "------------------------------------------------------"
    OutStream.WriteLine OutputString1
    OutStream.WriteLine OutputString2
    OutStream.WriteLine OutputString3
    OutStream.WriteLine OutputString4
    Set OutStream = Nothing
    end if
    %>



    <%
    'Routine per Ricerca e Visualizzazione NEWS
    'Indica da che punto devono partire le news...
    start=Request.Querystring("start")
    if isNull(start) or isEmpty(Start) or isNumeric(start)=False or Start="" Then
    Start=1
    else
    start=cint(start)

    if start=0 Then
    Start=1
    end if
    end if
    '

    '1=Lunedi
    'La settimana va dal Lunedi alla Domenica !!!
    'oggi=weekday(date,2)
    'inizio_settimana=date-oggi+1
    'fine_settimana=inizio_settimana+6

    'Converte le date in formato Americano x Access !!!
    'inizio_settimana=Month(inizio_settimana) & "-" & Day(inizio_settimana) & "-" & Year(inizio_settimana)
    'fine_settimana=Month(fine_settimana) & "-" & Day(fine_settimana) & "-" & Year(fine_settimana)
    '

    'sql2 = "SELECT count(id) as Totale_id FROM news WHERE data >= #" &inizio_settimana& "# AND data <=#" &fine_settimana& "#"
    sql2 = "SELECT count(id) as Totale_id FROM news"
    set rs2 = objConn.Execute(sql2)
    totale_news=rs2("totale_id")

    if totale_news >=1 Then
    ' sql = "SELECT TOP " &cstr(totale_news)& " * FROM news WHERE data >= #" &inizio_settimana& "# AND data <= #" &fine_settimana& "# ORDER BY id desc"
    sql = "SELECT TOP " &cstr(totale_news)& " * FROM news ORDER BY id desc"
    set rs = objConn.Execute(sql)
    else
    Start = 1
    end if

    if Start > totale_news Then
    Start=1
    end if
    '

    'Query per Sondaggio !!!
    sql_sondaggio = "SELECT * FROM sondaggi WHERE val='OK'"
    set rs_sondaggio = objConn.Execute(sql_sondaggio)
    id_sond=rs_sondaggio("id_sond")
    '

    'Query per Suoneria del Giorno !!!
    sql_suoneria = "SELECT * FROM Suonerie WHERE data=date()"
    set rs_suoneria = objConn.Execute(sql_suoneria)
    id_suoneria=rs_suoneria("id")
    '


    'Query per Prodotti
    'Primo Prodotto
    sql_prodotti = "SELECT * FROM Prodotti WHERE posizione='Prima posizione'"
    set rs_prodotti = objConn.Execute(sql_prodotti)
    id_prodotto1=rs_prodotti("id")
    titolo_prodotto1=rs_prodotti("titolo")
    img_prodotto1=rs_prodotti("img")
    '

    'Secondo Prodotto
    sql_prodotti = "SELECT * FROM Prodotti WHERE posizione='Seconda posizione'"
    set rs_prodotti = objConn.Execute(sql_prodotti)
    id_prodotto2=rs_prodotti("id")
    titolo_prodotto2=rs_prodotti("titolo")
    img_prodotto2=rs_prodotti("img")
    '

    'Terzo Prodotto
    sql_prodotti = "SELECT * FROM Prodotti WHERE posizione='Terza posizione'"
    set rs_prodotti = objConn.Execute(sql_prodotti)
    id_prodotto3=rs_prodotti("id")
    titolo_prodotto3=rs_prodotti("titolo")
    img_prodotto3=rs_prodotti("img")
    '

    'Quarto Prodotto
    sql_prodotti = "SELECT * FROM Prodotti WHERE posizione='Quarta posizione'"
    set rs_prodotti = objConn.Execute(sql_prodotti)
    id_prodotto4=rs_prodotti("id")
    titolo_prodotto4=rs_prodotti("titolo")
    img_prodotto4=rs_prodotti("img")
    '

    'Quinto Prodotto
    sql_prodotti = "SELECT * FROM Prodotti WHERE posizione='Quinta posizione'"
    set rs_prodotti = objConn.Execute(sql_prodotti)
    id_prodotto5=rs_prodotti("id")
    titolo_prodotto5=rs_prodotti("titolo")
    img_prodotto5=rs_prodotti("img")
    '
    '
    %>
    <html>

    <head>
    <META NAME="DESCRIPTION" CONTENT="italia">
    <META NAME="KEYWORDS" CONTENT="italia">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title></title>
    </head>

    <link rel="stylesheet" href="include/stili.css">
    <SCRIPT src="include/script.js" type=text/javascript></SCRIPT>

    <script>
    function popup(str) {
    searchWin = window.open(str,'','scrollbars=no,resizable=yes,wi dth=500,height=270,status=no,location=no,toolbar=n o');}
    </script>

    <body topmargin="0" leftmargin="0" bgcolor="#000080" text="#000080">

    <center>
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="779" id="AutoNumber2" bgcolor="#FFFFFF">
    <tr>
    <td width="150" valign="top" height="100%" style="border-right-style: solid; border-right-width: 2; border-left-style:solid; border-left-width:1" bgcolor="#FFFFFF">
    </td>
    <td width="479" style="border-left-style: solid; border-left-width: 1; border-right-style:solid; border-right-width:2" valign="top" align="center">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber14">
    <tr>
    <td width="100%">
    <p align="center"><font face="Arial" color="#000080" size="2">
    <%
    Set cr = Server.CreateObject( "MSWC.ContentRotator" )
    Response.write(cr.ChooseContent("include/slogan.txt"))
    %></font>
    </td>
    </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber9">
    <tr>
    <td width="100%">
    <%
    if totale_news >=1 Then
    call news
    else
    call nessuna_news
    end if
    %><font face="Arial"> </font>
    </td>
    </tr>
    </table>
    <div align="center">
    <table border="0" width="98%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%" bgcolor="#FEDCC2" style="border: 1px solid #000000; ">
    </center>
    </td>
    </tr>
    </table>
    </div>
    <table border="0" width="100%" cellspacing="0" height="131">
    <tr>
    <td width="100%" valign="top" align="center" height="129">
    </center>
    <div align="center">
    <table border="0" width="95%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%">
    <p align="right">
    <font face="Arial">
    [img]immagini/sfiziosità.gif[/img]</font></td>
    </tr>
    </table>


    </div>
    </td>
    </tr>
    </table>



    </td>
    <td width="149" valign="top" height="100%" style="border-left-style: solid; border-left-width: 1; border-right-style:solid; border-right-width:1" bgcolor="#FFFFFF">
    </td>
    </tr>
    <tr>
    <td width="779" valign="top" colspan="3">
    </td>
    </tr>
    </table>
    </center>

    </body>

    </html>



    <%sub nessuna_news%>
    <%end sub%>

  8. #8
    Utente di HTML.it L'avatar di Baol74
    Registrato dal
    Jul 2002
    Messaggi
    2,004
    Appunto, dov'è che lo apri sto recordset? Non vedi che non c'è l'apertura?

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.