Replace function in Access

  • Thread starter Thread starter seanmatthewwalsh
  • Start date Start date
S

seanmatthewwalsh

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
 
You are using d0t.net?

From (foggy) memory: can't you write the replace function in
javascript in the page and modify the column defintion to use it?
Maybe this is what you don't want to do.

d0t.net does many things well but I find it restrictive. By the time I
change it to make it do things my way, I wonder what the point of
using it at all is; more money for Bill, I guess.
 
Back
Top