Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can you save CF code in an Access database?

Posted on 2006-07-05
14
Medium Priority
?
133 Views
Last Modified: 2013-12-24
I am working on a workaround but ideally I would like to do this:

I have a field in an Access database (have tried text and memo fields) and am trying to store CF variables such as

...mailto:#PE.Active#?cc=#PE.Backup#&Subject=Webmaster...

But the email opens with the variables literally as #PE.Active# instead of their values...



0
Comment
Question by:firstbankak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
  • +1
14 Comments
 
LVL 7

Expert Comment

by:bwasyliuk
ID: 17044443
I store variables, etc in my database (always need to be careful that they exist when doing the following, but it works):

I might have a value like this in a database field: "this is a string with a variable called 'test', its value is"&variable.test

This is of course a very contrived example, but you can take this value (lets say it is in Col1) and evaluate it:

<cfoutput>#evaluate(myquery.Col1)#</cfoutput>

Let me know if you need me to explain further.
0
 

Author Comment

by:firstbankak
ID: 17044516
Hmmmm...here's literally what I am trying to accomplish:

<cfoutput query='test'>
<a href='#mhLink#'>#mhName#</a>
</cfoutput>


where mhLink = "mailto:#PE.Active#?cc=#PE.Backup#&Subject=Webmaster"
0
 
LVL 7

Expert Comment

by:bwasyliuk
ID: 17044587
So, you could do:

<cfoutput query='test'>
<a href='#evaluate(mhLink)#'>#mhName#</a>
</cfoutput>

Of course, the #PE.Active# and #PE.Backup# variables have to exist prior to this evaluate step.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:firstbankak
ID: 17045009
You know, that didn't work, but thanks for helping out I'm just going to go another way with this...
0
 
LVL 7

Expert Comment

by:bwasyliuk
ID: 17045447
Out of curiosity - which part didnt work?
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17051365
You need to use quotes in the DB, so it should look like this:

'mailto:' & #PE.Active# & '?cc=' & #PE.Backup# & '&Subject=Webmaster'

Then you could use:

evaluate(yourQuery.yourColumn)
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 17051685
why not use a "flag"
real basic ex:
at time of insert or update db you put in the flag

for ex, you insert this text:
"mailto:^PEActive^?cc=^PEBackup^&Subject=Webmaster"

Then when you pull it out:
#replace(PE.yourdbfield,"^PEActive^",PE.Active,"all")#

I'm assuming your query name is "PE"

et cetera
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17132319
How did this work for you?  If it didn't work with the hash marks from my previous example, try removing them - - but this should work.
0
 
LVL 7

Expert Comment

by:bwasyliuk
ID: 17406674
Believe my code & usachrisk1983's code are virtually the same - and would both solve the question.
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17406869
I agree with bwasyliuk, and if the poster had any problems with them, I'm sure we'd both be happy to continue to try and debug the problems.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 17407980
Hello guys
I do believe mine is the best solution.
Real simple and straight forward.
0
 

Author Comment

by:firstbankak
ID: 17407997
Please close this question.  The individual who initiated the question with me is no longer employed here.

Thank you!
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 2000 total points
ID: 17408029
Well that hardly seems fair to us, firstbankak.
We, sometimes, put a lot of work into these questions.
And even when question is fairly simply, like this one, the job was completed and our only pay is a few points.
Thank You
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

704 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