Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 17
  1. #1

    Errore:ADODB.Recordset.Gli argomenti non sono di tipo valido, non sono compresi nell'

    Ciao a tutti ,

    ho il seguente problema :

    Tipo di errore:
    ADODB.Recordset (0x800A0BB9)
    Gli argomenti non sono di tipo valido, non sono compresi nell'intervallo consentito o sono in conflitto.
    /Pages/Includes/Database.asp, line 44


    La riga 44 è la seguente :

    oRS.Open strSQL, CStr(GetConnectionString) ,3,3

    Tutto il file è il seguente :

    <%
    function killChars(strWords)

    dim badChars
    dim newChars ,i

    badChars = array("select", "drop", ";", "--", "insert", "delete", "xp_")
    newChars = strWords

    for i = 0 to uBound(badChars)
    newChars = replace(newChars, badChars(i), "")
    next

    killChars = newChars

    end function
    function SQLSafeString(pstrString)
    SQLSafeString=replace(pstrString,"'","''")
    end function

    function QuerySafeString(pstrString)
    QuerySafeString=replace(pstrString,"'","''")
    QuerySafeString=killChars(QuerySafeString)
    end function

    Class clsDatabase
    Public GetConnectionString

    'Private Sub Class_Initialize
    ' End Sub

    ' Private Sub Class_Terminate
    ' End Sub

    Public Function Execute(strSQL,strErrorMessages)

    Dim oRS
    'on error resume next
    strErrorMessages=""
    Set oRS = Server.CreateObject("ADODB.Recordset")
    oRS.CursorLocation = 3
    'Response.Write strSQL
    oRS.Open strSQL, CStr(GetConnectionString) ,3,3
    if err.number <> 0 then
    strErrorMessages = strErrorMessages & " Error occured. " & err.description & ""
    err.clear
    end if
    oRS.ActiveConnection = Nothing
    Set Execute = oRS
    Set oRS = Nothing

    End Function


    Public sub ExecuteDML(strSQL,strErrorMessages)

    Dim con
    'on error resume next
    Set con = Server.CreateObject("ADODB.Connection")
    Con.Mode = 3
    con.Open CStr(GetConnectionString) ,"Admin",""

    if err.number <> 0 then
    strErrorMessages=strErrorMessages & " Error occured. " & err.description & ""
    err.clear
    end if
    con.Execute (strSQL)
    if err.number <> 0 then
    strErrorMessages = strErrorMessages & " Error occured. " & err.description & ""
    err.clear
    end if

    End sub

    End Class

    function TableBodyList(byval pstrSQL,pstrHeaderRowParameters, _
    pstrHeaderColumnParameters,pstrDataRowParameters, _
    pstrDataColumnParameters,byref pconClass)

    dim strTemp,rst,i,intFieldCount',conClass
    'set conClass =new ClsDataBase
    'conClass.getconnectionstring = PortalConnectString
    'set rst= conClass.Execute (pstrSQL)
    'esponse.Write pstrSQL
    'esponse.End
    set rst= pconClass.Execute(pstrSQL,strTemp)

    if strTemp<>"" then
    strTemp="<TR " & pstrDataRowParameters & "><TD " & pstrDataColumnParameters & ">" & strTemp & "</TD></TR>"

    TableBodyList = strTemp

    exit function
    else

    strTemp="<TR " & pstrHeaderRowParameters & ">"
    intFieldCount=rst.fields.count-1
    for i = 0 to intFieldCount
    strTemp= strTemp & "<TH " & pstrHeaderColumnParameters & ">" & Replace(rst.fields(i).name,"'","") & "</TH>"
    next
    strTemp= strTemp & "<TH " & pstrHeaderColumnParameters & ">Delete</TH>"
    strTemp= strTemp & "</TR>"
    while NOT rst.eof
    strTemp= strTemp & "<TR " & pstrDataRowParameters & ">"

    strTemp= strTemp & "<TD " & pstrDataColumnParameters & "><A HREF =""javaScript:ModifyData('" & rst(0).value & "')"" >" & _
    rst(0).value & "</A></TD>"
    for i = 1 to intFieldCount
    strTemp= strTemp & "<TD " & pstrDataColumnParameters & ">" & rst(i).value & "</TD>"
    NEXT
    strTemp= strTemp & "<TD " & pstrDataColumnParameters & "><A HREF =""javaScripteleteData('" & rst(0).value & "')"">Delete</TD>"

    strTemp= strTemp & "</TR>"
    rst.movenext
    wend
    end if
    TableBodyList = strTemp
    set rst = nothing
    exit function

    end function

    function ComboBoxOptionList(byval pstrSQL,pstrSelectedValue, _
    byref pconClass)
    dim strTemp,rst,strTempResults
    set rst= pconclass.Execute (strsql,strTempResults)
    strTemp = ""
    if strTempResults ="" then

    while not rst.eof
    strTemp=rst(0).value
    IF pstrSelectedValue=strTemp then
    strTempResults = strTempResults & "<OPTION SELECTED VALUE='" & strTemp & "'>" & rst(1).value & "</OPTION>"
    else
    strTempResults = strTempResults & "<OPTION VALUE='" & strTemp & "'>" & rst(1).value & "</OPTION>"
    end if

    rst.movenext
    wend
    else
    strTempResults = "<OPTION VALUE=''>" & strTempResults & "</OPTION>"
    end if
    ComboBoxOptionList = strTempResults

    set rst = nothing
    exit function

    end function


    function TableMenuList(byval pstrSQL,pstrHeaderRowParameters, _
    pstrHeaderColumnParameters,pstrDataRowParameters, _
    pstrDataColumnParameters,byref pconClass)

    dim strTemp,rst
    set rst= pconClass.Execute(pstrSQL,strTemp)

    if strTemp<>"" then
    strTemp="<TR " & pstrDataRowParameters & "><TD " & pstrDataColumnParameters & ">" & strTemp & "</TD></TR>"

    TableMenuList = strTemp

    exit function
    else

    while NOT rst.eof
    strTemp= strTemp & "<TR " & pstrDataRowParameters & ">"

    strTemp= strTemp & "<TD " & pstrDataColumnParameters & "><A target =""Pages"" HREF =""" & rst(1).value & """ >" & _
    rst(0).value & "</A></TD>"
    strTemp= strTemp & "</TR>"
    rst.movenext
    wend
    end if
    TableMenuList = strTemp
    set rst = nothing
    exit function

    end function

    %>

  2. #2
    fatti stampare strSQL e controllala. di sicuro ti manca qualche parametro

  3. #3
    ho provato a stamparla ma esce sempre l'errore e non me la fa stampare, come posso fare?

  4. #4
    ho fatto un :

    Response.Write("TEST strSQL " & strSQL)

  5. #5
    aggiungi subito dopo

    Response.Flush

    oppure

    Response.End

    quest'ultima ferma il programma (non esegue la query, ma almeno ti fa vedere la stringa)

  6. #6
    ora mi esce questo errore :

    ADODB.Recordset error '800a0bb9'

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

    /Pages/Includes/Database.asp, line 44

  7. #7

  8. #8
    si ho messo response.end

    e ora non mi visualizza niente, pagina bianca

  9. #9
    e come se fosse che non c'e niente

  10. #10
    shoppino, dove l'hai messo il response.end?

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.