09 gennaio 2005 alle 23:06:38 Salve a tuti ragazzi! ho istallato il mod mercatino per asp nuke 1.2 2003 server e ho questo problema: Se non ci si logga come utenti non c'è nessun tipo di errore, però se si effettua il login e poi si apre la pagina mercatino.asp compare questo errore:
Microsoft VB Script runtime error '800a01a8'
Object required: 'oCnadd'
/includes/mercatino-inc.asp, line 731
Come mai!??!!? sono settimane che rifaccio le procedure ma mi da questo maledettissimo errore!!!!! sto veramente impazzendo!!!!
In amministrazione va tutto alla grande, se però proviamo ad aggiungere una nuova categoria, l'aggiunge però sotto compare l'errore:
Microsoft VB Script runtime error '800a01a8'
Object required: 'oCn'
/includes/admin/mercatino-inc.asp, line 353
ed in più scompare tutta la colonna destra del sito che contiene i blocchi di destra!!!!!
Vi prego aiutatemi a risolvere questo problema che mi rende impossibile l'utilizzo del mercatino...
NOVITA' SU ASPNUKE BY ARCANIS...OH MA CHE CARINI MI HANNO DEFACCIATO L'ASPNUKE! http://arcanis.somee.com
Arcanis
Avanzato
198 Discussioni
12 gennaio 2005 alle 15:47:46 Nessuno che può aiutarmi!? dai almeno qualcuno che mi dica il significato di quell'errore... sono settimane che sto facendo prove e riprove.
Mi appello a voi, onnipotenti del codice asp!!!!!!!!!!!!!!
12 gennaio 2005 alle 16:18:14 Riguardando il vecchio codice del mercatino, mi sembra che vi siano delle incongruenze sul numero delle righe segnalate negli errori, non è che, hai effettuato delle modifiche al codice? Comunque, il primo errore riguarda, per quello che vedo io, la riga 670: Dim catIDtemp, oCnadd, oFS, fileold, filenew, rSQLadd, oRsadd, numero, ext, NomeFile, NomeFileOld, NomeFileDef, OrigFile, formula, risultato controlla che vi sia il dimensionamento della variabile oCnadd, aggiungilo nella riga. Per il secondo errore, credo sia dipendente dal primo. Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
13 gennaio 2005 alle 20:43:55 grazie infinite ragazzi!!! non passo alla 2.04 perchè il titolare del sito non vuole. io lo ho realizzato in quanto lui non conosce niente su come fare web. Cosi insieme lo gestiamo... Con dimensionamento che intendi!? perdona la mia ignoranza... devo aggiungere ocnadd prima!? devo metterlo tra apici!? Grazie ancora, siete veramente unici! Ave onnipotenti dell'asp! Il vostro adepto hihihi
--------------- Arcanis
13 gennaio 2005 alle 21:00:17 Devi controllare se la stringa che ho inserito nel post precedente è identica: Dim..... con tutte le variabili, se non c'è ocnadd aggiungila per ultima alla riga. Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
NOVITA' SU ASPNUKE BY ARCANIS...OH MA CHE CARINI MI HANNO DEFACCIATO L'ASPNUKE! http://arcanis.somee.com
Arcanis
Avanzato
198 Discussioni
13 gennaio 2005 alle 22:18:46 Ho controllato... la riga è scritta identica a come l'hai scritta tu. ocnadd c'è ed è scritta proprio per prima. ecco il contenuto del mio mercatino-inc.asp:
<% 'percorso fisico della cartella di upload StrPath = "d:inetpubwebsottegadimagiccompublicmercatino"
'percorso virtuale della cartella di upload StrPathShort = "/public/mercatino/"
While not oRs.EOF Response.Write " <tr class=""tableline" & iLine & """>" & vbCRLF Response.Write " <td align=""left""><b>"&UCase(oRs("categoria"))&"</b></td>" & vbCRLF
rSQL1 = "SELECT COUNT(id) as t FROM mercatino_annuncio WHERE catID="&oRs("id")&" AND valido=True" Set oRs1 = DBRecordSet (oCn, rSQL1)
If oRs1("t").Value >=1 then Dim LastDate rSQL2 = "SELECT top 1 datainserimento FROM mercatino_annuncio WHERE catID="&oRs("id")&" AND valido=True ORDER BY datainserimento DESC" Set oRs2 = DBRecordSet (oCn, rSQL2) LastDate = GetDateDDMMYYHHMMSS(StringToDate(oRs2("datainserimento"))) Response.Write " <td align=""center""><a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=view&catID="&oRs("id")&"&page=1"" title=""Visualizza gli annunci presenti"">"&iif(oRs1("t").Value=1,""&oRs1("t").Value&" annuncio presente",""&oRs1("t").Value&" annunci presenti")&"</a></td>" & vbCRLF Else LastDate = "-" Response.Write " <td align=""center"">"&iif(oRs1("t").Value=1,""&oRs1("t").Value&" annuncio presente",""&oRs1("t").Value&" annunci presenti")&"</td>" & vbCRLF End If
Else CreateTable "NoCat","", "<b>Nessuna categoria presente !</b>", "" End If
End Sub
Sub ViewAnnuncioMercatino(catID, page, where) Dim oCn, oRs, rSQL, oRs1, rSQL1, oRs2, rSQL2, oRs3, rSQL3 Dim RecordsPerPagina, i, pag, NumeroPagine, iLine Dim isWhere, isType
If where="vendo" then isWhere = "tipo=0 AND" isType="&where=vendo" page="1" ElseIf where="cerco" then isWhere = "tipo=1 AND" isType="&where=cerco" page="1" ElseIf where="tutti" then isWhere = "" isType="&where=tutti" page="1" Else isWhere = "" isType="&where=tutti" page="1" End If
RecordsPerPagina=10
Set oCn = DBConnexion(DB_MERCATINO)
rSQL = "SELECT * FROM mercatino_annuncio WHERE "&isWhere&" catID="&catID&" AND valido=True ORDER BY datainserimento DESC" Set oRs = Server.CreateObject("ADODB.Recordset") oRs.CursorLocation = 3 oRs.Open rSQL, oCn oRs.PageSize = RecordsPerPagina NumeroPagine = oRs.PageCount
If page = "" then page=1
rSQL1 = "SELECT categoria FROM mercatino_categoria WHERE id="&catID&"" Set oRs1 = DBRecordSet(oCn, rSQL1)
rSQL2 = "SELECT COUNT(id) as t FROM mercatino_annuncio WHERE catID="&catID&" AND valido=True AND tipo=0" Set oRs2 = DBRecordSet(oCn, rSQL2)
rSQL3 = "SELECT COUNT(id) as f FROM mercatino_annuncio WHERE catID="&catID&" AND valido=True AND tipo=1" Set oRs3 = DBRecordSet(oCn, rSQL3)
CreateTopTable "Annunci", "Annunci presenti in: """&UCase(oRs1("categoria"))&"""" Response.Write GLOBAL_SITE_SUBTABLE & vbCRLF Response.Write " <tr class=""tableline1"">" & vbCRLF Response.Write " <td align=""left"">" & vbCRLF Response.Write " "&iif(oRs.RecordCount=1,"E' presente","Sono presenti")&" <b>"&oRs.RecordCount&"</b> "&iif(oRs.RecordCount=1,"<b>annuncio</b>","<b>annunci</b>")&" in questa categoria.<br><br>" & vbCRLF Response.Write " <li><b>"&oRs2("t")&"</b> "&iif(oRs2("t")=1,"è","sono")&" di tipo <b>VENDO</b>" & vbCRLF Response.Write " <li><b>"&oRs3("f")&"</b> "&iif(oRs3("f")=1,"è","sono")&" di tipo <b>CERCO</b>" & vbCRLF If oRs.RecordCount>=1 then Response.Write " <br><br>" & vbCRLF Response.Write " <a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=view&catID="&catId&"&where=tutti&page=" & page & """>Visualizza TUTTI</a>" & vbCRLF End If If oRs2("t")>0 then Response.Write " | <a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=view&catID="&catId&"&where=vendo&page=" & page & """>Visualizza solo VENDO</a>" & vbCRLF If oRs3("f")>0 then Response.Write " | <a href="""&GLOBAL_SITE_URL & GLOBAL_SITE_PATH&"mercatino.asp?do=view&catID="&catId&"&where=cerco&page=" & page & """>Visualizza solo CERCO</a>" & vbCRLF Response.Write " </td>" & vbCRLF Response.Write " </tr>" & vbCRLF Response.Write "</table>" & vbCRLF CreateBottomTable ""
oCn.Close Set oCn = Nothing Set oRs = Nothing Set oRs1 = Nothing
End Sub
Sub DisplaySearchMercatino(parola, categoria, tipo) Dim oCn, oRs, rSQL Dim RecordsPerPagina, i, pag, NumeroPagine, iLine, page Dim catID, parcor
Set oCn = DBConnexion(DB_MERCATINO)
parcor = Replace(parola,"'","''")
If categoria = "all" then rSQL = "SELECT * FROM mercatino_annuncio WHERE titolo like '%"&parcor&"%' OR testo like '%"&parcor&"%' OR nota like '%"&parcor&"%' AND valido=True" If tipo<>2 then rSQL = rSQL & " AND tipo="&tipo&"" End If
Else
rSQL = "SELECT * FROM mercatino_annuncio WHERE (titolo like '%"&parcor&"%' OR testo like '%"&parcor&"%' OR nota like '%"&parcor&"%') AND catID="&categoria&" AND valido=True" If tipo<>2 then rSQL = rSQL & " AND tipo="&tipo&"" End If End If
RecordsPerPagina=10
Set oRs = Server.CreateObject("ADODB.Recordset") oRs.CursorLocation = 3 oRs.Open rSQL, oCn
If not oRs.EOF then oRs.PageSize = RecordsPerPagina NumeroPagine = oRs.PageCount If page = "" then page = 1
Sub DisplayInsArticolo() CreateTable "Insert","NUOVO ARTICOLO INSERITO !", "<b>L'articolo sarà reso disponibile, dopo essere stato controllato dagli amministratori, nel giro di 24 ore.</b>", "" DisplayCategorieMercatino End Sub
Function GoInsertAnnuncioMercatino(catID, datainserimento, tipo, titolo, testo, nota, immagine, isMessage, nome, email, telefono, citta, login) Dim oCn, rSQL
oCn.Close Set oCn = Nothing Response.redirect ("mercatino.asp?do=insart") End Function %>
<_Script language="Java_Script"> function confcanc() { if (confirm("Cancellare l'annuncio?")) { return true; } else { return false; } } </_Script> <%
Function GoDeleteAnnuncioMercatino(id) Dim oCn, rSQL
Set oCn = DBConnexion(DB_MERCATINO) rSQL = "DELETE from mercatino_annuncio WHERE id="&id&"" DBExecute oCn, rSQL
oCn.Close Set oCn = Nothing GoDeleteAnnuncioMercatino = True
End Function
Sub DoActionMercatino() Dim isMessage
If request("isMessage") = "" then isMessage = "0" Else isMessage = "1" End If
Select Case Request("Action") Case "add" : Dim catIDtemp, oCnadd, oFS, fileold, filenew, rSQLadd, oRsadd, numero, ext, NomeFile, NomeFileOld, NomeFileDef, OrigFile, formula, risultato
catIDtemp = Request("catID") If Request("immagine") = "" then NomeFileDef = "" Else Set oCnadd = DBConnexion(DB_MERCATINO) rSQLadd = "SELECT top 1 id FROM mercatino_annuncio ORDER BY id DESC" Set oRsadd = DBRecordSet (oCnadd, rSQLadd) If oRsadd.BOF AND oRsadd.EOF then numero = 0 Else numero = oRsadd("id") End if formula = "risultato = 1+" &numero Execute(formula) numero = risultato ext = RIGHT(Request("immagine"),4) NomeFileOld = Request("immagine") NomeFile = "mercat" & numero & ext Set oFS = Server.CreateObject("Scripting.FileSystemObject") fileold = "d:inetpubwebsxxxxxxxxxxxxyyypublicmercatino" &NomeFileOld filenew = "d:inetpubwebsxxxxxxxxxxxxyyypublicmercatino" &NomeFile oFS.MoveFile fileold, filenew NomeFileDef = "/public/mercatino/" &NomeFile End if GoInsertAnnuncioMercatino Request("catID"), DateTimeToString(Request("datainserimento")), Request("tipo"), Replace(Request("titolo"), "'", "''"), Replace(Request("testo"), "'", "''"), Replace(Request("note"), "'", "''"), NomeFileDef, isMessage, Replace(Request("nome"), "'", "''"), Request("email"), Request("telefono"), Replace(Request("citta"), "'", "''"), Request("login") Case "delete" : GoDeleteAnnuncioMercatino Request("id") End Select
oCnadd.Close Set oCnadd = Nothing Set oRsadd = Nothing
End Sub
Sub DisplayMercatino()
Select Case Request("do") Case "insart" : SearchMercatino DisplayInsArticolo Case "view" : SearchMercatino ViewAnnuncioMercatino Request("catID"), Request("page"), Request("where") Case "new" : If sPseudo <> "" Then InsertAnnuncioMercatino Request("catID") Else DisplayAlertNotRegistrato SearchMercatino DisplayCategorieMercatino End If Case "search" : SearchMercatino DisplaySearchMercatino Request("parola"), Request("categoria"), Request("tipo") Case "item" : SearchMercatino ZoomAnnuncioMercatino Request("id") Case Else: SearchMercatino DisplayCategorieMercatino End Select
End Sub
Sub DisplayAlertNotRegistrato()
CreateTopTable "Signup", GetTranslation("LANG_SIGNUP") Response.Write "<div align=""justify"">"& vbCRLF Response.Write "Per poter inserire un annuncio all'interno del MERCATINO devi essere un <b>utente registrato</b>!<br><br>"& vbCRLF Response.Write "Iscriviti anche tu per poter usufruire di questo servizio. <a href=""../signup.asp"" target=""_self"">Clicca qui</a>"& vbCRLF Response.Write "</div>"& vbCRLF CreateBottomTable ""
NOVITA' SU ASPNUKE BY ARCANIS...OH MA CHE CARINI MI HANNO DEFACCIATO L'ASPNUKE! http://arcanis.somee.com
Arcanis
Avanzato
198 Discussioni
15 gennaio 2005 alle 14:56:27 può darsi che la mia versione del mercatino per win 2003 sia vecchia... o meglio sia quella uscita all'inizio di prova. Tu DJ se hai quella definitiva per aspnuke 1.2 win 2003 potresti metterma online così la scarico!?