If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > undefined function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-02, 10:29
nicky nicky is offline
Registered User
 
Join Date: Sep 2002
Posts: 3
Question 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.
Reply With Quote
  #2 (permalink)  
Old 09-27-02, 12:26
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Can you translate the error message description to english ?
Reply With Quote
  #3 (permalink)  
Old 09-27-02, 12:34
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Which version of vb/access are you running ?
Reply With Quote
  #4 (permalink)  
Old 10-04-02, 08:44
nicky nicky is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 10-04-02, 12:47
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
How are you accessing the data from access (ado/dao) ? Are you using vbscript or javascript ?
Reply With Quote
  #6 (permalink)  
Old 10-04-02, 12:49
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
Also, how are you using the StringToUrl function ? Can you post the code ?
Reply With Quote
  #7 (permalink)  
Old 10-09-02, 03:04
nicky nicky is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On