Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2002
    Posts
    3

    Question Unanswered: undefined function

    Hi All,

    I am having trouble retreiving data from a acces database with IIS.

    Here's the story:

    I've set up a acces database with 3 tables, some query's and one VBAfunction.

    One of those query's is using the VBAfuntion. While in access executing the query it is returning the records just fine. If I try to execute the query trough IIS I get some "undefined funtion" error message.
    (I'm running a dutch IIS version and the exact error
    "Microsoft JET Database Engine error '80040e14'
    De expressie bevat een ongedefinieerde functie StringToUrl.
    /advertentie.asp, line 31" also dutch.)
    The query's not using the VBAfunction behave as expected.

    I have searched the internet for some time now, and I cannot find a related topic.

    For the record: I'm Dutch and I hope my english is not too confusing.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Can you translate the error message description to english ?

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    Which version of vb/access are you running ?

  4. #4
    Join Date
    Sep 2002
    Posts
    3

    Post

    Hi, sorry it took a while to respond.

    The error message:
    "De expressie bevat een ongedefinieerde functie StringToUrl",
    would translate as:
    "The expression contains a undefined function StringToUrl",
    where StringToUrl is the previously mentioned VBAFunction.

    I am using Access 2000 (9.0.3821 SR-1) and IIS 5.0.

  5. #5
    Join Date
    Feb 2002
    Posts
    2,232
    How are you accessing the data from access (ado/dao) ? Are you using vbscript or javascript ?

  6. #6
    Join Date
    Feb 2002
    Posts
    2,232
    Also, how are you using the StringToUrl function ? Can you post the code ?

  7. #7
    Join Date
    Sep 2002
    Posts
    3
    Here's a snippet from the ASP

    <%
    Dim Conn, RS
    Dim strId,strSQL,intLoop

    strId=Request.QueryString("id")
    strSQL = "SELECT * FROM qryAdv Where IdAdvertentie=" & strId

    Set Conn=Server.CreateObject("ADODB.Connection")
    Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\") & "\db\allestekoop.mdb"
    Set RS=Server.CreateObject("ADODB.RecordSet")
    RS.Open strSQL, Conn, adOpenDynamic, adLockPessimistic, adCMDText

    This is the Query

    SELECT tblAdv.IdAdvertentie, tblAdv.IdCatagorie, tblAdv.Datum, tblCat.Catagorie, tblAdv.Teller, IIf([AangebodenGezocht],"Gezocht","Aangeboden") AS AangebodenOfGezocht, tblAdv.Naam, tblAdv.Woonplaats, tblProv.Provincie, "<a href=mailto:" & [tblAdv].[Email] & ">" & [tblAdv].[Email] & "</a>" AS [E-mail], tblAdv.Telefoon, tblAdv.Prijs, tblAdv.Omschrijving, IIf(IsNull([tblPic]![Pic]),'Nee','<a href=' & StringToUrl('ToonFoto.asp?Omsch=' & [tblAdv]![Omschrijving] & '&IdAdv=' & [tblPic]![IdAdvertentie]) & '>Klik hier</a>') AS Foto, tblAdv.Beschrijving
    FROM ((tblAdv INNER JOIN tblCat ON tblAdv.IdCatagorie = tblCat.IdCatagorie) INNER JOIN tblProv ON tblAdv.IdProv = tblProv.IdProv) LEFT JOIN tblPic ON tblAdv.IdAdvertentie = tblPic.IdAdvertentie;

    This is the Function

    Public Function StringToUrl(strInput As String) As String

    Dim intLoop As Integer
    Dim strChar As String * 1
    Dim strOutput

    For intLoop = 1 To Len(strInput)
    strChar = Mid$(strInput, intLoop, 1)
    Select Case strChar
    Case " "
    strOutput = strOutput + "%20"
    Case Else
    strOutput = strOutput & strChar
    End Select
    Next
    StringToUrl = "'" & strOutput & "'"

    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •