Salve a tutti,
sono un neofita di asp e mi trovo ad affrontare un problema riguardo un trasferimento di dominio.
Il sito, che non č di mia creazione, č realizzato con asp e database access.
Sto provando in locale il funzionamento ma ho riscontarto il seguente problema:
ADODB.Connection (0x800A0BB9)
Gli argomenti non sono di tipo valido, non sono compresi nell'intervallo consentito o sono in conflitto.
/euroclamp/flashEuro.asp, line 113
Vi posto il codice di flashEuro.asp:
Posto inoltre il codice del file global.asa che contiene il percorso del database:codice:<%@ Language=VBScript %> <% if StartPageProcessing() Then Response.End() %> <form name="thisForm" METHOD="post"> <html> <head> <script ID="serverEventHandlersVBS" LANGUAGE="vbscript" RUNAT="Server"> Sub thisPage_onenter() setPage "dataUltimoAggiornamento" contenuti.open if flashEuro.firstEntered then session("lingua")="italiano" end if if Request.QueryString("lingua")<>"" then session("lingua")=Request.QueryString("lingua") end if session("pagina")="flashEuro.asp" End Sub sub setPage(Page) sql="SELECT * from contenuti where pagina='" & page & "'" contenuti.setSQLText(sql) end sub </script> <link REL="stylesheet" TYPE="text/css" HREF="Style.CSS"> </head> <body> <!--METADATA TYPE="DesignerControl" startspan <OBJECT classid="clsid:8CC35CD6-E98B-11D0-B218-00A0C92764F5" id=PageObject1 style="LEFT: 0px; TOP: 0px" VIEWASTEXT> <PARAM NAME="ExtentX" VALUE="4233"> <PARAM NAME="ExtentY" VALUE="1270"> <PARAM NAME="State" VALUE="(ObjectName_Unmatched=\qflashEuro\q,NavigateMethods=(Rows=0),ExecuteMethods=(Rows=0),Properties=(Rows=0),References=(Rows=0))"></OBJECT> --> <SCRIPT LANGUAGE=JavaScript RUNAT=SERVER> /* VIPM PAGE DESCRIPTION <DSC NAME="flashEuro"> <OBJECT NAME="navigate"> <METHOD NAME="show" SCENARIOS="CLIENT,SERVER"/> </OBJECT> </DSC> VIPM PAGE DESCRIPTION */ </SCRIPT> <% Sub [_PO_OutputClientCode]() %> <SCRIPT LANGUAGE=JavaScript> if (typeof flashEuro_onbeforeserverevent == 'function' || typeof flashEuro_onbeforeserverevent == 'unknown') thisPage.advise('onbeforeserverevent', 'flashEuro_onbeforeserverevent()'); flashEuro = thisPage; flashEuro.location = "flashEuro.asp"; flashEuro.navigate = new Object; flashEuro.navigate.show = Function('thisPage.invokeMethod("", "show", this.show.arguments);'); </SCRIPT> <% End Sub %> <SCRIPT LANGUAGE=JavaScript RUNAT=SERVER> function _PO_getClientAccessor(serverValue) { if (serverValue == null) return 'null'; return 'unescape("' + escape(serverValue) + '")'; } function _PO_ctor() { thisPage.getClientAccessor = _PO_getClientAccessor; flashEuro = thisPage; flashEuro.location = "flashEuro.asp"; flashEuro.navigate = new Object; flashEuro.navigate.show = Function('return;'); thisPage._objEventManager.adviseDefaultHandler('flashEuro','onenter'); thisPage._objEventManager.adviseDefaultHandler('flashEuro','onexit'); thisPage._objEventManager.adviseDefaultHandler('flashEuro','onshow'); thisPage.registerVTable(thisPage.navigate, PAGE_NAVIGATE); } function _PO_dtor() { if (thisPage._redirect == '') _PO_OutputClientCode(); } </SCRIPT> <!--METADATA TYPE="DesignerControl" startspan <OBJECT id=contenuti style="LEFT: 0px; TOP: 0px" classid="clsid:9CF5D7C2-EC10-11D0-9862-0000F8027CA0" VIEWASTEXT> <PARAM NAME="ExtentX" VALUE="12197"> <PARAM NAME="ExtentY" VALUE="2090"> <PARAM NAME="State" VALUE="(TCConn_Unmatched=\qConnection1\q,TCDBObject_Unmatched=\qSQL\sStatement\q,TCDBObjectName_Unmatched=\q\q,TCControlID_Unmatched=\qcontenuti\q,TCPPConn_Unmatched=\qConnection1\q,TCPPDBObject=\qTables\q,TCPPDBObjectName=\qcontenuti\q,RCDBObject=\qRCSQLStatement\q,TCSQLStatement_Unmatched=\q\q,TCCursorType=\q3\s-\sStatic\q,TCCursorLocation=\q3\s-\sUse\sclient-side\scursors\q,TCLockType=\q3\s-\sOptimistic\q,TCCacheSize_Unmatched=\q10\q,TCCommTimeout_Unmatched=\q10\q,CCPrepared=0,CCAllRecords=1,TCNRecords_Unmatched=\q10\q,TCODBCSyntax_Unmatched=\q\q,TCHTargetPlatform=\q\q,TCHTargetBrowser_Unmatched=\qServer\s(ASP)\q,TCTargetPlatform=\qInherit\sfrom\spage\q,RCCache=\qRCBookPage\q,CCOpen=0,GCParameters=(Rows=0))"></OBJECT> --> <SCRIPT LANGUAGE="JavaScript" RUNAT="server"> function _initcontenuti() { var DBConn = Server.CreateObject('ADODB.Connection'); DBConn.ConnectionTimeout = Application('Connection1_ConnectionTimeout'); DBConn.CommandTimeout = Application('Connection1_CommandTimeout'); DBConn.CursorLocation = Application('Connection1_CursorLocation'); DBConn.Open(Application('Connection1_ConnectionString'), Application('Connection1_RuntimeUserName'), Application('Connection1_RuntimePassword')); var cmdTmp = Server.CreateObject('ADODB.Command'); var rsTmp = Server.CreateObject('ADODB.Recordset'); cmdTmp.ActiveConnection = DBConn; rsTmp.Source = cmdTmp; cmdTmp.CommandType = 1; cmdTmp.CommandTimeout = 10; //Errore del DTC Recordset. Impossibile ottenere il testo del comando. cmdTmp.CommandText = ''; rsTmp.CacheSize = 10; rsTmp.CursorType = 3; rsTmp.CursorLocation = 3; rsTmp.LockType = 3; contenuti.setRecordSource(rsTmp); if (thisPage.getState('pb_contenuti') != null) contenuti.setBookmark(thisPage.getState('pb_contenuti')); } function _contenuti_ctor() { CreateRecordset('contenuti', _initcontenuti, null); } function _contenuti_dtor() { contenuti._preserveState(); thisPage.setState('pb_contenuti', contenuti.getBookmark()); } </SCRIPT> <Table align=center> <tr> <td align=center><p align="left" class="intestazione"> <% if session("lingua")="italiano" then %> Data ultimo aggiornamento: <%else%> Last update: <% end if %> <% Response.Write contenuti.fields.getvalue( session("lingua")) %> </td> </tr><tr> <td> <object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="500" height="370" > <param name=movie value="flash/euroclamp2.swf"> <param name=quality value=high> <embed src="flash/euroclamp2.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="500" height="370" > </embed> </object> </td> </tr> </table> </div> </body> <% EndPageProcessing() %> </form> </html>
Non so proprio come venirne a capo, ringrazio anticipatamente tutti coloro che vorranno aiutarmi!codice:<SCRIPT LANGUAGE=VBScript RUNAT=Server> 'In questo file č possibile aggiungere gestori di eventi speciali che verranno eseguiti automaticamente 'al verificarsi di eventi speciali nelle pagine ASP. Per creare questi gestori, creare una subroutine 'con uno dei nomi elencati di seguito, corrispondente all'evento che si desidera utilizzare. Per creare, 'ad esempio, un gestore di eventi per Session_OnStart, inserire nel file il codice seguente (senza i commenti): 'Sub Session_OnStart session("lingua")="italiano" session("flash")=1 '**Inserire il codice in questa posizione** 'End Sub 'EventName Descrizione 'Session_OnStart Viene eseguito la prima volta che un utente esegue una pagina dell'applicazione. 'Session_OnEnd Viene eseguito in caso di timeout di una sessione utente oppure quando un utente esce dall'applicazione. 'Application_OnStart Viene eseguito una volta quando la prima pagina dell'applicazione viene eseguita per la prima volta da un utente. 'Application_OnEnd Viene eseguito una volta allo spegnimento del server Web. </SCRIPT> <SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Application_OnStart '==Visual InterDev Generated - startspan== '--Project Data Connection 'Application("Connection1_ConnectionString") = "dsn=euroclamp;" Application("Connection1_ConnectionString") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\euroclamp\wwweuroclampit\euroclamp.mdb;" Application("Connection1_ConnectionTimeout") = 15 Application("Connection1_CommandTimeout") = 30 Application("Connection1_CursorLocation") = 3 '-- Project Data Environment 'Set DE = Server.CreateObject("DERuntime.DERuntime") 'Application("DE") = DE.Load(Server.MapPath("Global.ASA"), "_private/DataEnvironment/DataEnvironment.asa") '==Visual InterDev Generated - endspan== End Sub </SCRIPT>

Rispondi quotando