delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

                result = luList.LoadValues(fn, keyType)
                loadLookupList = (result = 0)
                Set oFSO = Nothing
                Set oText = Nothing
                Set oRs = Nothing
                Set oConn = Nothing
End Function
The result = luList.LoadValues(fn, keyType), is giving this error :
Microsoft VBScript runtime error '800a01a8'
Object required: 'luList'
//includes/DBLookup.asp, line 519
Does anyone has any idea why ??? Your is very much needed.
Thanks.
Suran


My lookup function that creates a.txt lookuptable  is giving thi error.  The function looks like this:
Function loadLookupList(ByVal luList, ByVal keyType, ByVal tblName, ByVal sortField)
'
'        load table into application dictionary
'
                Dim oDB, oConn, oRs, sqlStmt
                Dim oFSO, oText, fn
                fn = Server.MapPath("/virtual") & "\lookups\lookup" & tblName & ".txt"
                sqlStmt = "SELECT * FROM " & tblName
                If sortField <> "" THen sqlStmt = sqlStmt & " ORDER BY " & sortField
                Set oFSO = Server.CreateObject("Scripting.FileSystemObject")
                Set oText = oFSO.CreateTextFile(fn,True)
                Set oDB = New clsDB
                result = oDB.Open
                If Not result Then Exit Function
                Set oConn = oDB.Connection
                Set oRs = oConn.Execute(sqlStmt)
                While Not oRs.Eof
                        key = oRs(0)
                        buffer = ""
                        For i = 1 to oRs.Fields.Count - 1
                                buffer = buffer & "#" & oRs.Fields(i)
                        Next
                        value = Mid(buffer, 2)        ' strip leading #
                        oText.WriteLine(key & "," & value)
                        oRs.MoveNext
                Wend
                oText.Close
                result = luList.LoadValues(fn, keyType)
                loadLookupList = (result = 0)
                Set oFSO = Nothing
                Set oText = Nothing
                Set oRs = Nothing
                Set oConn = Nothing
End Function
The result = luList.LoadValues(fn, keyType), is giving this error :
Microsoft VBScript runtime error '800a01a8'
Object required: 'luList'
//includes/DBLookup.asp, line 519
Does anyone has any idea why ??? Your is very much needed.
Thanks.
Suran

TOP

The function looks okay.  Can you post the code that is calling the function?  Apparently the first parameter being passed isn't a valid object... that's what it seems to me.  However, I am not an expert at ASP, so I may be wrong.

TOP

This is the calling function:
Function initLookup()
    initLookup = loadLookupList(luProdClass, 12, "ProdClass", "Name")
End Function
Thanks for helping
Suran

TOP

Have you identified line 519?
My initial thoughts are that the object luList has not been initialised before calling the function, or that the luList you are passing is not set up correctly.



                result = luList.LoadValues(fn, keyType)
                loadLookupList = (result = 0)
                Set oFSO = Nothing
                Set oText = Nothing
                Set oRs = Nothing
                Set oConn = Nothing
End Function
The result = luList.LoadValues(fn, keyType), is giving this error :
Microsoft VBScript runtime error '800a01a8'
Object required: 'luList'
//includes/DBLookup.asp, line 519
Does anyone has any idea why ??? Your is very much needed.
Thanks.
Suran

TOP

Back Forum