[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Undefined function error when creating database results page to MS Access DB from Front Page with Replace() function

Posted on 2003-03-28
3
Medium Priority
?
222 Views
Last Modified: 2013-12-24
I'm trying to strip the dashes out of an ISBN string field for my book database for use in my web page. Here's the SQL query as created by MS Access (and subsequently modifed by me :-)

SELECT Editions.ID, Editions.ISBN, Replace([Editions].[ISBN],"-","") AS CleanISBN
FROM Editions;

The query works fine in Access, but I get the following error when I try to create a database results region in FrontPage 2000:

Server error: Unable to retrieve schema information from the record source 'Web: Edition Detail foo' in a database using the connection string:

'DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/library.mdb'.

The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[Microsoft][ODBC Microsoft Access Driver] Undefined function 'Replace' in expression.

Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)


I've read in various places that not all functions available in Access are supported by the ODBC driver, however my research seems to indicate that Replace() is an ODBC 1.0 function, and I'm using drivers with versions 4.0+

So I'd like to know how to tell the ODBC driver to smarten up, or how to remove the dashes after the data has been retrieved into the web page. I'm not adverse to using JavaScript or something like that, but I'd need a detailed answer, as I'm not familiar with JavaScript or other client side scripting options.

Thanks,!
0
Comment
Question by:rstrang
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
hhammash earned 300 total points
ID: 8229616
Hi,

You do not need to put it in your SQL statement.

Just make your DRW as normally,  then when you finish save your DRW.  AFTER saving your DRW put it on Spooky Diet.  Then replace the field name with this line:

Your line will be like this ORIGINALLY:
<td>
<%=FP_FieldVal(fp_rs,"ISBN")%>
</td>

REPLACE IT WITH:

<td>
<%=replace (FP_Field(fp_rs,"ISBN"),"-","") %></td>
</tr>

Note that here FP_Field is used instead of FP_FieldVal

You can find Spooky Diet on:
http://www.outfront.net/spooky/adv_drw.htm

Special thanks to Spooky.

Best regards
hhammash
0
 

Author Comment

by:rstrang
ID: 8230402
Wow! Fast and easy. How come I didn't find the Spooky Diet when I was doing my search for Front Page web resources?

Thanks a lot!

Richard
0
 
LVL 14

Expert Comment

by:hhammash
ID: 8233247
You are welcome

hhammash
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question