473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Replace function in Access

Hi

I have a website that uses an Access 2003 database. I have controls on
my pages that are bound to SqlDataSources that pull data from this
database. In a couple of them, I need to use the replace function to
replace some text in the results. Access' REPLACE function is only
available if executed within the environment, as it's a VBA function,
not a SQL function. So how can I implement this is the EASIEST
possible way? I don't to rewrite all my pages to first pull the data
into a DataSet and then do the replace, as I'll soon be back on SQL
Server, and can use the Replace function there.

Can I either do some sort of post-result transformation on the page
side, or how do I set up a macro / function in Access that the query
will be able to see? I created a MYREPLACE function in a Module, which
works fine if I run it in Access, but I still get the web error:
System.Data.OleDb.OleDbException: Undefined function 'MYREPLACE' in
expression

thanks
Sean
Jun 27 '08 #1
1 2819
On Tue, 20 May 2008 02:09:32 -0700 (PDT), se**************@hotmail.com
wrote:

MYREPLACE is a Vba function just like REPLACE, and you already stated
they cannot be used.
You'll have to do this on the DotNet side, or postpone the work until
you're back on SQL Server.

-Tom.

>Hi

I have a website that uses an Access 2003 database. I have controls on
my pages that are bound to SqlDataSources that pull data from this
database. In a couple of them, I need to use the replace function to
replace some text in the results. Access' REPLACE function is only
available if executed within the environment, as it's a VBA function,
not a SQL function. So how can I implement this is the EASIEST
possible way? I don't to rewrite all my pages to first pull the data
into a DataSet and then do the replace, as I'll soon be back on SQL
Server, and can use the Replace function there.

Can I either do some sort of post-result transformation on the page
side, or how do I set up a macro / function in Access that the query
will be able to see? I created a MYREPLACE function in a Module, which
works fine if I run it in Access, but I still get the web error:
System.Data.OleDb.OleDbException: Undefined function 'MYREPLACE' in
expression

thanks
Sean
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
2
by: Sharon | last post by:
I've had an Access 2000 app running successfully for many months on both Windows XP and Windows 2000. Recently when my Windows 2000 users call a particular report, they get first a dialog...
8
by: skinnybloke | last post by:
Hi - I am a newbie to Access & SQL and I would appreciate some help on this if at all possible. I have a query that contains the following code. SELECT DISTINCT Product. AS , Product. AS ; ...
3
by: asd987 | last post by:
Hi, Can anyone tell me if "replace" is supported by Access 97? I use the Dutch version and get the errormessage "sub or function not supported". Or is the Professional Edition needed? Thanks.
3
by: Dave | last post by:
I have an Access 2K application that is distributed to about a dozen users (all with identical NT environments and identical Access versions, object libraries and service packs). I am using the VBA...
5
by: galsaba | last post by:
I just found out that Replace Function exists in Access XP (as part of MS Office), but does not exist in Access 2000 (as part of access 2000). Any idea how I can resolve it? Does access 2000 has an...
2
by: Ermi | last post by:
Hi, i have this problem.... From a visual basic application I must replace the value contained in a column with another one....for example Field1 ------ Alfa Beta Gamma
3
by: mal_lori | last post by:
Hello, I have an ongoing problem with a single machine not recognizing the REPLACE function. This is a WinXP Pro machine, running Office 2000 (SP3) with MDAC 2.8 (SR1) and Jet 4 installed. ...
4
by: Lauren Wilson | last post by:
Hi folks, We have a need to replace sub strings in certain message text. We use the Office Assistant to display help and often use the imbedded formatting commands. Those of you who have used...
1
by: seanmatthewwalsh | last post by:
Hi I have a website that uses an Access 2003 database. I have controls on my pages that are bound to SqlDataSources that pull data from this database. In a couple of them, I need to use the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.