Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    69

    ADODB.Command error '800a0bb9' : Gli argomenti non sono di tipo valido, non sono ....

    Salve sto provando ad usare l'estensione Shopping Cart 1.2.1 per Dreamweaver Mx v6.1
    praticamente la pagina ordina.asp, acquisisce i dati dalla pagina carrello.asp, mi chiede di confermare i dati dell'utente tramite un forum e dovrebbe passare il tutto alla pagina evaso.asp
    Alla fine il carrello funziona, passa i dati all'ordine dandomi numero d'ordine e i dati del cliente da modificare (la dove sia necessaria), ma quando clicco su conferma ordine, ottengo questo errore:

    ADODB.Command error '800a0bb9'

    Gli argomenti non sono di tipo valido, non sono compresi nell'intervallo consentito o sono in conflitto.

    /itaPub/ordina.asp, line 134

    di seguito tutto il codice:

    ************************************************** **************

    <%@LANGUAGE="VBSCRIPT"%>
    <%
    ' *** Restrict Access To Page: Grant or deny access to this page
    MM_authorizedUsers="LIVELLO=1"
    MM_authFailedURL="../ita/login.asp"
    MM_grantAccess=false
    If Session("MM_Username") <> "" Then
    If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
    (InStr(1,MM_authorizedUsers,Session("MM_UserAuthor ization"))>=1) Then
    MM_grantAccess = true
    End If
    End If
    If Not MM_grantAccess Then
    MM_qsChar = "?"
    If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
    MM_referrer = Request.ServerVariables("URL")
    if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
    MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
    Response.Redirect(MM_authFailedURL)
    End If
    %>


    <%
    ' *** Edit Operations: declare variables

    Dim MM_editAction
    Dim MM_abortEdit
    Dim MM_editQuery
    Dim MM_editCmd

    Dim MM_editConnection
    Dim MM_editTable
    Dim MM_editRedirectUrl
    Dim MM_editColumn
    Dim MM_recordId

    Dim MM_fieldsStr
    Dim MM_columnsStr
    Dim MM_fields
    Dim MM_columns
    Dim MM_typeArray
    Dim MM_formVal
    Dim MM_delim
    Dim MM_altVal
    Dim MM_emptyVal
    Dim MM_i

    MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
    If (Request.QueryString <> "") Then
    MM_editAction = MM_editAction & "?" & Request.QueryString
    End If

    ' boolean to abort record edit
    MM_abortEdit = false

    ' query string to execute
    MM_editQuery = ""
    %>
    <%
    ' *** Insert Record: set variables

    If (CStr(Request("MM_insert")) = "form1") Then

    MM_editConnection = MM_CONN3_STRING
    MM_editTable = "ORDINI"
    MM_editRedirectUrl = ""
    MM_fieldsStr = "NOMINATIVO|value|PIVA|value|INDIRIZZO|value|CAP|v alue|CITTA|value|PV|value|TEL|value|FAX|value|EMAI L|value|NOTE|value"
    MM_columnsStr = "NOME|',none,''|PIVA|',none,''|INDIRIZZO|',none,'' |CAP|',none,''|CITTA|',none,''|PV|',none,''|TEL|', none,''|FAX|',none,''|EMAIL|',none,''|NOTE|',none, ''"

    ' create the MM_fields and MM_columns arrays
    MM_fields = Split(MM_fieldsStr, "|")
    MM_columns = Split(MM_columnsStr, "|")

    ' set the form values
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
    Next

    ' append the query string to the redirect URL
    If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
    End If

    End If
    %>
    <%
    ' *** Insert Record: construct a sql insert statement and execute it

    Dim MM_tableValues
    Dim MM_dbValues

    If (CStr(Request("MM_insert")) <> "") Then

    ' create the sql insert statement
    MM_tableValues = ""
    MM_dbValues = ""
    For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
    MM_formVal = MM_emptyVal
    Else
    If (MM_altVal <> "") Then
    MM_formVal = MM_altVal
    ElseIf (MM_delim = "'") Then ' escape quotes
    MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
    Else
    MM_formVal = MM_delim + MM_formVal + MM_delim
    End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
    MM_tableValues = MM_tableValues & ","
    MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
    Next
    MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

    If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If

    End If
    %>

    <%
    UC_OrderIdSessionVar = "IDOrdine"
    If Session(UC_OrderIdSessionVar)="" Then
    ' Get a unique OrderID number and save to session.
    UC_tableName = "NEXTID"
    UC_fieldName = "NEXTID"
    UC_sql = "select " & UC_fieldName & " from " & UC_tableName
    tmp = "ADODB.Recordset"
    set UC_rsId = Server.CreateObject(tmp)
    UC_rsId.ActiveConnection = MM_CONN3_STRING
    UC_rsId.Source = UC_sql
    UC_rsId.CursorType = 0
    UC_rsId.CursorLocation = 2
    UC_rsId.LockType = 2
    UC_rsId.Open
    Session(UC_OrderIdSessionVar) = UC_rsId.Fields(UC_fieldName).value
    UC_rsId.Fields(UC_fieldName).value = Session(UC_OrderIdSessionVar) + 1
    UC_rsId.Update
    UC_rsId.Close
    set UC_rsId = Nothing
    End If

    UC_CartColNames=Array("ProductID","Quantity","TG", "COD","Name","Price","Total")
    UC_ComputedCols=Array("","","","","","","Price")
    set UCCart1=VBConstuctCart("UCCart",0,UC_CartColNames, UC_ComputedCols)
    UCCart1__i=0
    %>
    <%
    Dim UTENTE__MMColParam
    UTENTE__MMColParam = "1"
    If (Session("MM_USERNAME") <> "") Then
    UTENTE__MMColParam = Session("MM_USERNAME")
    End If
    %>
    <%
    Dim UTENTE
    Dim UTENTE_numRows

    Set UTENTE = Server.CreateObject("ADODB.Recordset")
    UTENTE.ActiveConnection = MM_CONN2_STRING
    UTENTE.Source = "SELECT * FROM USER WHERE USERNAME = '" + Replace(UTENTE__MMColParam, "'", "''") + "'"
    UTENTE.CursorType = 0
    UTENTE.CursorLocation = 2
    UTENTE.LockType = 1
    UTENTE.Open()

    UTENTE_numRows = 0
    %>
    <%
    If InStr(1, MM_editAction, "?", vbTextCompare) = 0 Then
    MM_editAction = MM_editAction + "?UC_SaveCartToTable=1"
    Else
    MM_editAction = MM_editAction + "&UC_SaveCartToTable=1"
    End If
    If (CStr(Request("UC_SaveCartToTable")) = "1") Then
    set UC_connCart = Server.CreateObject("ADODB.Connection")
    UC_connCart.Open MM_CONN3_STRING
    UC_redirectPage = "evaso.asp"
    UC_destColName = Array("IDCT","QTA","TAGLIA","COD","TITOLO","PREZZO ","TOTALE")
    UC_destColType = Array("num","num","str","str","str","num","num")
    UC_orderId = Session("IDOrdine")
    UCCart1.SaveToDatabase UC_connCart,"DETTAGLI","IDOR","str",UC_orderId,UC_ destColName,UC_destColType
    ' redirect with URL parameters (remove the "UC_SaveCartToTable" query param).
    if (UC_redirectPage = "") Then UC_redirectPage = CStr(Request.ServerVariables("URL"))
    If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
    newQS = "?"
    For Each Item In Request.QueryString
    If (Item <> "UC_SaveCartToTable") Then
    If (Len(newQS) > 1) Then newQS = newQS & "&"
    newQS = newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
    End If
    Next
    if (Len(newQS) > 1) Then UC_redirectPage = UC_redirectPage & newQS
    End If
    Response.Redirect(UC_redirectPage)
    End If
    %>
    <html>
    <head>
    <title>Colombo Mario S.n.c. &gt;&gt; Abbigliamento Professionale</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script>
    </head>

    <body bgcolor="#FFFFFF" text="#003399" link="#003399" vlink="#003399" alink="#003399">
    <table width="75%" height="566" align="center" bordercolor="#0033CC" background="../immagini/sfondocm.jpg">
    <tr valign="middle">
    <td height="102" align="center">

    [img]../immagini/CM.jpg[/img]</p>


    <font color="#003399" size="2" face="Century Gothic">On-Line l'Utente:
    <%=(UTENTE.Fields.Item("NOME").Value)%> clicca per il LogOut</font></p></td>
    </tr>
    <tr align="center" valign="middle">
    <td height="382"><div align="center">
    <form name="form1" method="POST" action="<%=MM_editAction%>">
    <table width="98%">
    <tr>
    <td colspan="2"><font size="2" face="Century Gothic">Ordine N&deg; <%= Session("IDOrdine") %></font></td>
    </tr>
    <tr>
    <td width="19%"><font size="2" face="Century Gothic">Evaso da:</font></td>
    <td width="81%"><font size="2" face="Century Gothic">
    <input name="NOMINATIVO" type="text" id="NOMINATIVO" value="<%=(UTENTE.Fields.Item("NOME").Value)%>" size="40">
    * * * P. IVA/Cod.Fisc.
    <input name="PIVA" type="text" id="PIVA" value="<%=(UTENTE.Fields.Item("PIVA").Value)%>" size="16" maxlength="16">
    </font></td>
    </tr>
    <tr>
    <td><font size="2" face="Century Gothic">Indirizzo</font></td>
    <td><font size="2" face="Century Gothic">
    <input name="INDIRIZZO" type="text" id="INDIRIZZO" value="<%=(UTENTE.Fields.Item("INDIRIZZO").Value)% >" size="35">
    * * *
    <input name="CAP" type="text" id="CAP" value="<%=(UTENTE.Fields.Item("CAP").Value)%>" size="5" maxlength="5">
    -
    <input name="CITTA" type="text" id="CITTA" value="<%=(UTENTE.Fields.Item("CITTA").Value)%>" size="30">
    (
    <input name="PV" type="text" id="PV" value="<%=(UTENTE.Fields.Item("PV").Value)%>" size="2" maxlength="2">
    )</font></td>
    </tr>
    <tr>
    <td><font size="2" face="Century Gothic">Recapiti</font></td>
    <td><font size="2" face="Century Gothic">Telefono:
    <input name="TEL" type="text" id="TEL" value="<%=(UTENTE.Fields.Item("TEL").Value)%>" size="30">
    * * * fax:
    <input name="FAX" type="text" id="FAX" value="<%=(UTENTE.Fields.Item("FAX").Value)%>" size="30">
    </font></td>
    </tr>
    <tr>
    <td><font size="2" face="Century Gothic">E-Mail</font></td>
    <td><font size="2" face="Century Gothic">
    <input name="EMAIL" type="text" id="EMAIL" value="<%=(UTENTE.Fields.Item("EMAIL").Value)%>" size="80">
    </font></td>
    </tr>
    <tr>
    <td><font size="2" face="Century Gothic">Note</font></td>
    <td><font size="2" face="Century Gothic">
    <textarea name="NOTE" cols="75" rows="3" id="NOTE"></textarea>
    </font></td>
    </tr>
    <tr>
    <td><font size="2" face="Century Gothic"></font></td>
    <td><div align="right"><font size="2" face="Century Gothic">
    <input type="submit" name="Submit" value="Conferma Ordine">

    . . . ecc...


    ************************************************** *******************

    la riga incriminata è:

    133 Set MM_editCmd = Server.CreateObject("ADODB.Command")

    134 MM_editCmd.ActiveConnection = MM_editConnection

    135 MM_editCmd.CommandText = MM_editQuery
    136 MM_editCmd.Execute
    137 MM_editCmd.ActiveConnection.Close


    Come posso risolvere il problema?

    Per favore aiutatemi sono 2 mesi che ci sbatto la testa e sto passando da un forum all'altro.
    Grazie

  2. #2
    Prova a stampare la query e provala direttamente sul database.



    codice:
    MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")" 
    
    response.write MM_editQuery 
    response.end
    La connessione al database dove la apri?


  3. #3
    Utente di HTML.it
    Registrato dal
    May 2003
    Messaggi
    69

    Re:

    in che senso?
    ho fatto una pagina test.asp
    per scrivere i dati nella tabella
    e test1.asp per leggerli

  4. #4
    MM_Quanto MM_codice MM_che MM_Dreamweaver MM_scrive!

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.