Hi Folks,
We haven't upgraded to 5.0 yet, and I have a client that wants a scatter
graph (or a line graph), but not a bar graph. I'm pretty sure there's no
easy way to do this for free. So, I've now been charged with figuring out if
we should buy some add on (like Corda), or wait to complete this
There's a couple of ways this can be handled. But, here's what I usually do.
Delete * from tblClientCategory WHERE clientid=#form.clientid#
(UPDATE tblClientCategory SET CategoryID=#listgetat(form.categoryid, i)#
WHERE
tblClientCategory.ClientID=#form.clientid#)
Essentially, instead of t
I handle this in a different way. Here's what I would do:
SELECT CategoryID, Category
FROM tblClientCategoryTypes
SELECT ClientID, CategoryID
FROM tblClientCategory
WHERE ClientID=#FORM.ClientID#
checked>
Make sense? If you're doing this a lot, you might want to make the list an
array
Hi Folks,
I'm having a stupid brain block on this one, and since the list isn't very
busy, I thought I'd toss it out there.
I have an oracle table like so:
POSPERLEN
positionid
responseid
What would the query be to count how many responseid's are in the table only
once (a person can have multip
Hi all,
Has anyone had problems looping over a query to enter people into an LDAP
group? I did this, and now I'm finding that even though I can "see" the
people when I do a cf ldap lookup, Netscape Directory Services doesn't
really "see" all the people.
The server admins say that people are "nest
Hiya Philip,
I did a little testing, and the issue (at least for me) was the direction of
the slash.
So:
variables.thisTemplateName=ListLast(CGI.CF_TEMPLATE_PATH,"/");
Is fine, while:
variables.thisTemplateName=ListLast(CGI.CF_TEMPLATE_PATH,"\");
Pulls the local file structure (as there is not
Mike,
You can still use my previous post- it's set for 5 records at a time, but
just change the maxrows attribute to 1.
But, do this: output the recordcount of your query (without the maxrows
attribute). See if for some reason your database is only returning one row.
-d
**
Yep, in the source code I'm getting this:
deann
[EMAIL PROTECTED]
Where x = drive letter on our web server.
Not so good.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Exten
Are you trying to have the user page through one record at a time? Cause
that's what you're going to get with this. You'll only ever get one user
whose id equals the passed id
---snip---> WHERE ID=#ID#
What I think you want is something like the following (quickly cut from
existing code, so proba
Cool, Philip. I'm going to have to play with this some more, but my only
initial comments would be:
1. give an example of usage in the docs
2. On my system, the variable for the filename to submit to is pulling the
local file system, as opposed to the web address. I haven't dug through the
code a
All ya gotta do is view source. They used photoshop and imageready. But, the
same could be done in Fireworks.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
Hm...I was using cfcontent (code snippet from a previous post by Ben Forta)
to create a csv file. We don't have the necessary stuff to use com for this.
I would just use the cf_excel custom tag (which we have installed) but I
need more control than that affords. I've got it working now, at least o
Since I posted I figured out that if I put all my code on line 1, I don't
have the white space problem. But, sheesh. Talk about ugly code!
I'll try cfsilent, too.
d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extensi
Hi folks,
I have a page that is creating an excel spreadsheet using multiple queries.
What happens is that a bunch of blank rows are generated in between the rows
with data. This doesn't happen in the plain text file.
I'd include the code, but it's long cause it's a many-tabled database that
I'm
Resultsmanager is your tablename, is it not? CF can't pull a variable from
the table while it's running the query. You would need to either use a sql
function (not a cf function) or do this in two steps, pulling the
resultsmanager.contestentid variable, and then looping through that
variable.
Mak
Hm.maybe I'm not understanding what it is you're trying to do, then.
What do you want to show up on your action page?
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103
You need to add values to your choice, then you need to do some logic to
determine which was selected.
Sooo,
Several Events Spread over the
summer
Action:
Several Events Spread over the summer: YesNo
Deanna Schneider
Interactive Me
Hm Okay. I see what you're saying, Paul. Is there a preferred way to do
dynamic sql in the database? Or, is the idea that one is better off doing
that which is dynamic in cf?
(Just trying to learn more about enterprise database solutions - not
challenging your viewpoint.)
-d
***
Paul said:
sp_executesql will gain you something in terms of optimization, etc. but
this isn't the kind of thing that ought to be in an sp (unless you're doing
this for security or management reasons)
Why not? I've been taught by our database folks that the more stuff we can
move into the databas
Erhere's the code!
for i in 1 .. 5
loop
execute immediate
'select count(*) from flpweb.grg_part where grg_part.siteid = '||
var_siteid ||' and '
|| column_name1 || ' = :b1 ' INTO counter1 USING to_char(i);
if i = 1 then
value1a := counter1;
percent1a := round((counter1/total_counter1)*100);
Hi Philip,
I don't know the sql server way to do this, but I know how to do it in
Oracle. Here's a sample bit of a stored procedure (I'm skipping all the
declare stuff, etc.) that shows how to do an immediate query and loop
through the results:
**
Try this instead:
The paren's aren't necessary, but might make it easier to see how cf
actually evaluates this.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bld
Will,
Are you using access? ID is a reserved word, I think. So, number one would
be to change the name of your field in the table. Also, is ID in members the
same as id in fields? If so, you can do something like this:
SELECTm.email, m.id
FROMmembers m, main_details d
WHERE(d.body
All right, so long ago, I upgraded to studio 4.5, hated it, and went back to
4.0. Now, all I've heard is good things about 4.5.2, so I installed 4.5
again and upgraded to 4.5.2.
Now, I keep getting low resource warnings (which was not happening with 4.0)
AND when I browse a directory that has sub
You can make a "real time" connection to oracle with access. Create a
select-only user for the oracle schema, then in access, use file - get
external data - type of odbc - set up a connection, and voila! Access front
end for Oracle.
-d
**
Yep, I'm using iarna. They seem pretty decent - reasonably quick response
time, easy interface.
Of course, the site that I have on there is just a "for fun" site and
doesn't get lots o' traffic.
-d
Deanna Schneider
Interactive Media
Okay, I'm coming up empty here. I'm using the cf_selectboxbuildtree tag with
some modifications to show our db of publications. All is well.
Now, my boss wants me to create a page that will pull out just the
publications that are identified by a 1 in a field in a corresponding table,
but still us
Doh, slow down and read the whole post, Deanna.
Let me try that again:
Flavor
Sunday
Monday
---etc---
#favordesc#
---etc---
On the resulting action page, you'd need to loop through your flavorids
again and determine which days were not passed as nulls, hence which muffin
types and how
You're almost there - you just need to add the input box within your output,
like so. (This assumes here that you're just trying to determine which
flavors someone wants, not how many.)
#flavordesc#
Deanna Schneider
Interactive
Hiya,
We never figured out for sure why our server was doing the 100% thing. We
did figure out that a.) it didn't happen on development, on on production
b.) the server didn't restart as we expected it to c.) we could "force" it
to shoot to 100% if we tried to use concantenation with an access db.
I haven't seen anyone answer this, so here goes - try adding the group by
statement. Also, indicate what you really want from the log_userstatus
table. If all you want is the date, just select that (and add it to the
group by clause).
SELECT
teaserusers.userid,
teaserusers.nickname,
teaserusers.f
Well, that was a stupid error, but it's not what's actually causing the
problem. (I fixed it and get the same error.)
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension
Hi folks,
This is probably more of an oracle question than anything, but I'm trying to
work with a stored procedure that our oracle dba gave me. She is, of course,
gone for the holidays. I'm using the following code to call the procedure:
-
Have you tried using #cgi.authuser#?, or is it auth_userI can never
remember and have to always test it or look it up.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Ext
Access reads a yes/no field as a 1 or a zero. Take your quotes off and pass
a 1 for yes, or a zero for no. See if that helps.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103
Larry,
Is it select access to the data that is an issue? Or is it
update/insert/delete? I would start by suggesting that you create another
user in the Oracle db and grant that user the barest minimum access to the
tables that is necessary. Use this "other" user as the web connection.
*
Hi Folks,
We have multiple developers running multiple applications on our server.
We've been having problems, and yes, we've read all the allaire docs on
performance tuning. One of our problems is that we have a number of
large-ish access applications. (Ugh, I know.)
I may have found a clue tod
erlistfind() function I mean.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
--
Just do a listgetat() function. If it returns zero, it wasn't in the list.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
Hm...yah, that's where I'm a wee bit confused. If you're looking for a form
variable and passing it as a url variable, it shouldn't work for either of
you.
Maybe if we saw some of the code it would help
-d
Deanna Schneider
Intera
Off the top of my head, it looks like you're passing the programid as a url
variable, not a form variable.
Although I'm not sure why that would work locally
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension
Access syntax is pretty funky. The easiest thing I've always found is to
open the access database and use the native query builder to create your
joins. When you're using multiple tables, you need to nest your joins.
Take a look at this example from a query I did:
FROM (party INNER JOIN (race IN
I would also caution you not to use words like "date," "time," and "id" as
your column names. Try to get a bit more specific - startdate, starttime,
fieldid, so that you're not using those "default" words which are often
reserved words.
-HTH
-d
*
SELECT A.somecolumn, b.somecolumn
fromtable1 a, table2 b
WHEREa.id = b.id (+)
I think AOL might be doing something funky with their caching servers where
dynamic content is concerned, anyway. AOL is hitting our server every three
seconds. Now, we're not that popular of a site, and it's used mostly by
internal folks (who do not have AOL accounts). AOL said it's because we ha
Donavan,
I would have contacted you directly, but you didn't include your email
address and I'm not gonna call ya long distance on my employer's nickel.
We use Oracle with Cold Fusion all the time. No problems with stability, but
there are some problems with using clobs.
-d
**
Didn't hang for me. In fact, it came up faster in netscape than in ie. Go
figure.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, W
Also, be sure that if you're using a "user" that has been granted access to
the data that you precede the table names with the appropriate user name.
For example: Your tables are in "myimportantdata." You're accessing your
tables through "webviewofimportantdata." Your queries would need to
refere
Um, I think you're trying to do this:
select *
from tbl
where
id = #id#
or
name = '#name#'
But, if these are the only two possibilities, then you'll need to do
something more like so:
select*
fromtable
WHERE
id = #id#
id = #id# OR name='#name#'
name = #name#
Get it?
-d
Thanks Peter. That did it. I swear I tried that. Oh well. Brain burp.
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
Nope, Peter, that doesn't work either. Thanks for the try.
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-
Thanks Jaime,
But, it doesn't work. Syntax Error.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
-
With Oracle you need a sequence and a trigger script. The trigger fires on
insert and pulls the next number from the sequence.
I can provide samples of each if you need.
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Coop
Hi folks,
I'm trying to use IIF in a query to count a bunch of yes/no values. Here's
what I'm trying that doesn't work (both count the total rows):
SELECT COUNT(IIF (success = 1, 1, 0)) as successyes,
COUNT(iif (success = 0, 1, 0)) as successno
FROM survey
I know I could do this:
SELECT COU
These folks are cheap and courteous, for small biz sites:
Their reseller program is very cost-effective.
http://www.virtualvision.net/varswelcomed.cfm
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic
Well, it sort of seems that way. We've contacted them and they agree that it
seems excessive. We have a lot of sites under several domains all on one
server. S, it could be legit.
But, the server is also crashing. Of course, we also have a variety of
developers working on sites - some of whom
AOL's caching server is currently hitting our server every three seconds.
Not a clue why. Go figure. We even denied access for a while, and they still
kept trying...over and over and over and over and over
-d
Deanna Schneider
Inte
Hi Folks,
Suddenly, every app that we have that has an access back-end is throwing the
following error:
ODBC Error Code = 08004 (Data source rejected establishment of connection)
[Microsoft][ODBC Microsoft Access Driver] Too many client tasks.
Thoughts?
-Deanna
*
Hi folks,
I'm sure this has been answered, but I couldn't find it in the archives.
Has someone written a sample piece of code to demonstrate the most effecient
way to return a newly created primary key whilst doing inserts?
In other words, I insert a record in the author table...I need to now in
I think what you want is something like so:
#name#
#address#
#email#
See if that works.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Ma
Okay, what I would say first is that you probably have some referential
integrity problems, as the two tables are dependent on each other, and the
completed table shouldn't have any id's in it that haven't already been used
in the current table. But, if you must do this...here's one solution. It's
You need to use the "createtimespan()" function around your sessiontimeout
numbers:
sessiontimeout = "createtimespan(52,0,0,0)"
But, that makes your session 52 days long. Do you really want to do that?
-d
Deanna Schneider
Interacti
Hi Folks,
I've been messing with a cfhttp project, and I've got everything to work.
But, now that I'm not on a timeline to get it to work, I'm wondering if
there's a better way to do what I did. Basically, I'm looking through a
whole page of html for one little number. So, I find the string with t
It's something on your actual form page that's throwing an error, so your're
getting error message content in your next "form field." Try checking for cf
syntax errors in the neighborhood of the 15th and 16th form fields.
-Deanna
Dea
You're not indicating any of your fields as text fields (you need to wrap a
field in 's, like so: 'form.givenname') That would definitely throw an
error.
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension
H, I have both installed without a problem. I had 97 installed first,
then installed 2000 from the disc and select the "install when first run"
option. I can switch back and forth and even have both running at once.
I have a Windows 98 OS, if that makes any difference.
-Deanna
***
Hi folks,
Just out of curiousity, has anyone integrated a CF app with a virage
application server? If so, are there things to watch out for? Are we insane
for even trying? Is it better to buy the *gulp* $10,000 Oracle plug-in to
port all the virage data to Oracle and screw that application server?
Try something like this. You're passing a comma-delimited list when you pass
checkboxes with the same name.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extensio
I think what it means is that you can't use <> with a literal string. <>
evaluates numbers. I think you want != (or is that =!, I always have to try
it both was).
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Exten
Well, yah, you have a point there.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
--
I just started using www.iarna.net. It's cheap and has been pretty reliable,
though so far I'm working with a pretty low volume site, that's still in
testing stage(www.etalers.com).
But, it might be worth checking out. (Caveat - I haven't used their email at
all.)
-Deanna
Michael,
There's a nifty custom tag in the allaire gallery called restricttextinput
that will do what you're needing with javascript prior to their even
submitting the form. You can indicate alpha, numeric, or alphanumeric, as
well as indicating additional allowed characters.
-Deanna
*
Hi Folks,
No one responded last time I posted this message, so I thought I'd try one
more time.
When attempting to index a collection on our production server, using the
same code that works on the development server, I get the following error:
Error occurred in tag CFINDEX
Internal Error: Purg
Hi Folks,
Does anyone know what this error means?
Error occurred in tag CFINDEX
Internal Error: Purge failed
Error Code: -23
The same code worked on the development server. The production server,
though, has multiple domains on "virtual servers," and I'm wondering if that
has something to do wi
Hi Folks,
I had a site that was collecting data, sticking it in a structure,
serializing it to wddx and passing it a url from a secure to a nonsecure
server. Everything was working fine until the server guys moved the secure
stuff to the new server, which is 4.5. Anything I should check for? I'm
g
On your action do this:
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
-
Sorry folks, trying to do too many things at once today. Ignore my ordering
by time question.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Stree
It sounds like what you really want to do is name your submit buttons like
so:
Each submit button would have a different name. Then on your action page
(formpage.cfm) you would do something like so:
do your code for form 1
etc...
Hope that helps.
**
Hi Folks,
I have a query that is ordering by a date field. The field contains both
date and time, but it's only ordering by the date, not the time within the
day (so the 10:00 a.m. event shows up before the 9:00). Do I have to change
the database to have a date field and a time field, or is there
Typically speaking, when you use "group" in a query output, it's to do
something like this:
#type#
#title#, #author# - #byline#
(See the nested cfoutputs? If you don't include the inner one, you'll only
get the first title, etc of the group.)
I'm not sure if you can use groups in cfmail, thoug
Hi Kelly,
For this one:
Just do it like this:
#numberformat(apipercent, "99.99")#%
For this one:
Try this:
:#minutes#
Hope that helps.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic P
Woo hoo!
Thanks Erik, that's exactly what I needed. Hm...now I just have to disect
that regular expression stuff so I know how to do it again. ;)
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic P
Hi Folks,
I have a dynamic voting application. The positions and locations open can
change, so I want it to be fully dynamic when the form is built and when the
data is inserted into the database. So, I can get the output onto the form
no prob. These are some examples of form fields and values tha
Right off the bat, I'd say...do you have any number fields? Like, for
instance, your id field? If it's a number, leave off the ' marks. Also,
you'll probably need to do something like this:
createodbcdate(thisdate) to convert the date field into an odbc format
(assuming an odbc type database such
Wait, the body has variables that are coming from a form - not a query?
There's your problem. You can't reference both a query and a form in the
cfmail tag. I've done workarounds where you create local variables instead.
Maybe someone else knows of a better way to handle this, though.
-d
*
Did you reference a query in the cfmail tag? Try adding that if you didn't
have it before.
i.e.:
your content, including #username#
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
1
Instead of:
Try something like this:
(Not sure on the exact syntax. This is direct from the CFML 4.0 language
reference, and they don't use any ##'s or ""'s (i.e.
#listcontains(session.privileges, deptid)# is not "0"), which I think you
might need. But, I'm blindly trusting the book here.
A
You can do it by setting those variables as application variables in the
application.cfm file. Like so:
You don't have to check for a defined application datasource, but it keeps
the snippet from running every time is page is called. Basically, it will
set the variables the first time, a
The error is occuring because the tag exists outside the
tags. In other words, you have things incorrectly nested. It
would be better do something like this:
?variable=#url.yourvariable#"
method="post">
Hope that helps.
-d
Deanna
Are you sure you used method="post"? If you forgot to add that, you wouldn't
have the fieldnames in the debugging.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension B
Duane,
I did something similar - writing ram files as people entered clips to a
database of audio and video files. Code goes something like this:
Let's put something in here to give it a few milliseconds...
-d
Deann
Doh! Thanks Mike.
-Deanna
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
-
Hi Folks,
I have a little issue that could be solved multiple ways, so I'm looking to
you all for suggestions.
The issue is this: my coworker has a form that he created that collects some
insecure and some secure data. Thus, the whole form is sitting on the secure
server (which he doesn't have ac
Doh, I forgot to add all the where clauses in that last sql thing, but you
get the idea
where t1.itemid = t2.itemid
andt1.itemid = 1
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Gro
Couldn't you accomplish this with a group function?
i.e.
#name# - #description# #categoryid#
I obviously can't test this, and I'm not sure this is exactly what you want,
but have you tried something like this?
d
Deanna Sch
The one time I've seen this happen was when the server admin didn't do a
complete uninstall of an earlier version of cf server before upgrading.
Somehow, there were two sets of session variables, and the variables didn't
_really_ get set until the second time. (So, people had to double log in,
etc
If the number of questions will always be the same, you can do a check to
see if all were answered:
You have not answered all questions! Go Back!
The name/value of the radio buttons is only passed if one was selected.
(This assumes that no other form fields exist on the page - i.e. you didn
Does anyone have a good example of a cold fusion project intake form? I.E. a
relatively non-technical form that can be used with clients to go over the
major aspects of a cold fusion job?
Here's my "rough draft" version of what I'm talking about We work
entirely with clientele from within our
Woo hoo! Thanks. I knew it must be something simple.
-d
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
103 Extension Bldg
432 N. Lake Street
Madison, WI 53706
(608) 265-7923
---
I'm relatively new to oracle. I've looked at the oracle site and not been
able to figure this out. Help anyone? The oracle site says that the error
usually means a column name was used in the "values" section of an insert
query, but none of those values are also column names...
Oracle Error Code
1 - 100 of 145 matches
Mail list logo