Some confusion apparent here -
The word Julian appears in two instances that I know of when referring to
dates. There is the Julian calendar and Julian dates.
The Julian calendar refers to the original calendar invented by Julius
Ceasar where a year was 365 1/4 days long. In 1582, Pope
Depending on the client's connection, auto-refresh the message frame could
be annoying at best.
I can envision a way of doing this entirely in Javascript using frames where
you could autorefresh a "hidden" frame (one that doesn't draw anything),
then use JS to check when a certain control field
Joe, check around the java applet sites. The basics of what makes
whiteboarding work is less than 100 lines of java code. There a good chance
you might find an free open source applet that works for you. If you have
someone on staff who has ever written java, many "Learn Java" books use
Short answer - almost always. Unfortunately, thats only almost good enough.
If you do sql like
select pkey_col
from table
where x
And fill in with the data that you just inserted, it will work
99.99% of the time. But not 100%. Depending on your data, it might
work 100% of the
First, create the sequence that you want to use.
create sequence MySequenceName start with 100 increment by 1
Next, use the sequence
insert into table
(table_pkey, )
values
(MySequenceName.nextval, ...)
95% of the time it works to use it in the insert statement. If you need the
number
One reason might be how the DB optmizes the query. If memory serves me
correctly, the keyword IN implies a subselect. Depending on your DB and
version, it may not sent to the server in the most efficient way.
As a test, try this code
SELECT *
FROM Products
WHERE PartNumber = 6956122
OR
Alex - yes, you can call a function from within a SQL statement
select countBusDays(dateasgn, '#form.startdate#', '#form.enddate#')
"FUNCTION"
from dual
is one example
Brian
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 3:15 PM
To: CF-Talk
Ok - analyzing the symptoms and its possible that it isn't a CF Server
issue.
I would suspect a change your mail server program. Many people (especially
ISPs) these days are restricting the from addresses that they will deliver
for; this is an anti-spamming issue. If the address that appears
To answer your question - yes you can. Just change the value clause of the
option statement to the empID.
cfquery name="qryUsers"
select fname, lname, empID
from table
/cfquery
select name="lname"
option
cfoutput query="qryUsers" group="lname"
cfif lname
Every time I've seen this come up, the solution is a combination of finesse
and outright hacking.
Basic solution -
Count the number of days between the two dates. If the startdate and
enddate are in M-F, that count DIV 7 will tell you how many weeks there
were, so subtract the number of weeks
Some simple code. There are other ways, but I think this is most straight
forward
cfset seconds=5000
cfset hours = seconds \ (3600)
cfset seconds = seconds mod 3600
cfset mins = seconds \ (60)
cfset seconds = seconds mod 60
cfoutput#hours#:#mins#:#seconds#/cfoutput
A note on CF division
Combining mine and Daniel's ideas, heres the fastest version I could
make...19 ms on my server.
cfscript
seconds = 5600.25;
hours = seconds \ 3600;
seconds = seconds mod 3600;
minutes = seconds \ 60;
seconds = seconds mod 60;
/cfscript
Very strange to say, but I suspect the problem in in your source code
structure. When CF operates on your source code, it doesn't remove
extraneous carriage returns. Try moving your closing tag up to the end of
the previous line.
Brian
-Original Message-
From: Paul Sinclair
Cool - this is a good thing to know. I'll keep it for future reference.
Brian
-Original Message-
From: Marc Garrett [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 6:03 PM
To: CF-Talk
Subject: Re: XML
[EMAIL PROTECTED] wrote
So, short summary - there are no existing CF
I think everyone has done a pretty good job of describing what XML is and
what it can do. Let me add one comment on the difference between HTML and
XHTML: XHTML is really just stricter HTML. Tags that are opened must be
closed and must be properly nested. Thats pretty much the most
OK - different subject, so I'm following with a different email:
Let me point out a very good reason NOT to use CF for XML. When you get
XML, you have to compare it to your DTD and then parse it to get the data
out. I'm not sure about you, but writing a parser as complex as this in CF
doesn't
I always use ifDefined("form.checkbox") to see if the box was checked.
Using CFParam seems (very slightly) more error prone to me.
Brian
-Original Message-
From: Roque,Carlos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 5:45 PM
To: CF-Talk
Subject: RE: Validating
Here's something that would be nice to do. I'm pretty sure this is an issue
that server side scripting alone can't handle, but any comments would be
nice.
I'll describe the hypothetical application, which is building an outline
tree. The user starts with a single parent item. Under that, he
This sounds like a different problem. If your network engineer has a packet
sniffer, I'd ask him to check out stuff from both sides of the firewall.
There are three areas that could be a problem...
Client: You don't have your client configured right. Client config is
pretty easy, but there
A deadlock is a mutual waiting condition...process A has locked table1 and
is waiting on table2. Process B has locked table2 and is waiting on table1.
Neither process will release their lock until they commit and it appears
they won't commit until after they obtain the other tableso, neither
The standard Oracle port is 1521. Occasionally I have heard that 1526 also
needs to be open, but I've never personally seen this case.
Brian
-Original Message-
From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 2:17 PM
To: CF-Talk
Subject: Oracle Port?
Ok - well you're asking about something that is utterly technology
independent that highlights a particular technologyso I think the answer
is no. You can't find a generic methodology that works only with a specific
technology.
If you questions is about Project Management packages written
One hack around that I can think of - adjust your input date by 20 years
before using the function, then un-adjust it afterwards. Not pretty, but it
should work quickly
Brian
-Original Message-
From: Arden Weiss [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 11, 2001 10:23 PM
Dropping out the Verity suggestions...since you did specify that you wanted
just CF and SQL. What you're proposing is not trivial, however it can be
done.
As a hack version of what I'll describe - you might be able to use Replace
(or REReplace) on the input string to get what you want some/most
Try the CF functions ListContains or ListFind. We dealt with the very same
issue and used one of these two to solve it, but I don't remember which.
This works as long as your database field is exactly a CF list format.
Brian
-Original Message-
From: Joby Bednar [mailto:[EMAIL
Or,
cfset num = Round(123456789/1000)/10 "MB"
Probably 100 ways to do this. I don't know which way is faster.
Brian
-Original Message-
From: Clint Tredway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 06, 2001 10:41 AM
To: CF-Talk
Subject: Re: converting a number to XXMB
Answer is that yes its possible. And, you're doing it almost the right way.
The problem could be the format of your dates. Actually, I think you have
your LT / GT symbols reversed too...GT now and LT an hour ago?
The first observation that I'll make is that you don't need to put a late
bound
Some possibilities:
1) Generate the primary key outside the database insertion. We use Oracle
and get the nextval from a Sequence, then insert the value 'manually'.
2) Do a select max(pkey) from the table. On the where clause, use all the
data that you just inserted...or a field combination
Ok -
First of all, it sounds like your customer knows what the problem is. He
has a contactor that isn't delivering what he promised.
Second...the ASP developer's 'excuse' is pure rubbish. Whatever ASP/CF
interaction there is you have explained (Processor, DB, etc)...and these are
not the
Actually, this doesn't quite work either. The formula doesn't account for
the decreasing distance between longitude lines as you go north. Try
putting in 180/90 and 0/90 (both at the north pole). Simple enough to fix,
you just need adjust the distance between longitutde based on the latitude.
No, seems to work now...
Brian
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:15 AM
To: CF-Talk
Subject: allaire.com
is anyone else haveing problems getting allaire.com to come up?
Jay Patton
Web Pro USA
406.549.3337 ext. 203
Here's some code that does it. If you care about what the source looks
like, take the CR/LF out of the source loops. Even has comments ;)
!--- Query the DB ---
cfquery name="t1" datasource="ds" dbtype="ODBC"
select distinct init
from test4
order by init
/cfquery
!--- Print the first All link
Small bug in my code...forgot the anchor name in the link. Change the line
that reads:
a href="link.cfm##"#t1.init#/a
to:
a href="link.cfm###t1.init#"#t1.init#/a
-Original Message-
From: Brian Flynn
Sent: Friday, January 26, 2001 1:45 PM
To: '[EMAIL PROTECTED]'
Subject:
Jay - I'd guess that maybe your SessionID isn't a numeric type? If it is
character, you'd need quotes around CFTOKEN:
WHERE SessionID = '#CFTOKEN#'
Brian
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 1:00 PM
To: CF-Talk
Subject: Data
Really? That sounds like a pretty big security hole to me
Brian
-Original Message-
From: Michel Vuijlsteke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 7:47 AM
To: CF-Talk
Subject: "." in urls
My IIS insists on turning
http://servername/index.cfm?art=MFW4.0
into
For the archives, here is a summary of the recommendations:
SiteRecommendation, Negative Recs
www.atswebnet.com 3
www.Crystaltech.com 3, -1
www.VirtualScape.com1
www.cfdynamics.com 1
www.cfm-resources.com 1
www.aaawebhosting.com 1
Brian
No, java isn't the only way. Check the tag library, there are at least 4-5
decent graphing tags in there.
Brian
-Original Message-
From: George Dong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 3:44 PM
To: CF-Talk
Subject: how to make bar, line chart in coldfusion
Hi
Hey guys...quick question, I'm just in a hurry and can't look it up myself.
For dealing with a firewall between CF server and a MS-SQL Server, what
ports need to be opened? Yes, after all my Oraclisms, I do have to deal
with SQL Server occasionally too
Brian
The only time I've needed graphing, I pulled a tag out of the Allaire tag
library. I do remember there are 4-5 tags in there that do different types
of graphing. Even if you can't use them, they might give you some ideas on
how to write your own.
Brian
-Original Message-
From: Jeff
I'm not sure exactly where your variables are coming from:
If StartDate and StartVisit are both in the table, why not use
where StartDate StartVisit.
If one is in a different format, then use a SQL function to convert it
where StartDate to_date('#StartVisit#','DD-Mon-')
Brian
You shouldn't need it for this application, but to answer you question:
At least in Oracle, two single quotes together is an escape sequence to
convert to one single quote;
'I''m comin'' ova' converts to the data "I'm comin' ova".
As Raymond said though, when you're doing a substitution inside
Just remember binary numbers:
(rwx)(rwx)(rwx) = (111)(111)(111) = 777
Similar
r-- = 100 = 4
r-x = 101 = 5
rw- = 110 = 6
You can always reconstruct what you need...
Brian
-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 7:29 PM
To:
The code that I've always seen is highly hacked. Here's the broad strokes.
I'm writing this as I go, you might have to modify a little for yours.
Heck, this code might not even work. But it does come close.
1) Count the number of weekend days.
If start_date is Sun,
One more '
INSERT INTO MyTABLE(Stuff)
VALUES =
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 11:59 AM
To: CF-Talk
Subject: Single Quotes in SQL HELP PLEASE!
ok, I want to enter this character into a SQL table. '
but i get an
I believe you want the Evaluate function.
CFSET a="xyz"
CFSET b="a"
CFOUTPUT
#Evaluate(b)#
/CFOUTPUT
prints
xyz
Brian
-Original Message-
From: Kevin Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 3:15 PM
To: CF-Talk
Subject: Questio\n
Dave,
Sorry to bother
CF's RE expressions are the POSIX compliant subset of what Perl uses. What
is commonly used in Perl (/s,/S,/d, etc) is not POSIX. However, Perl also
supports the POSIX set.
Here's another link that I've used:
http://www.psyberspace.net/coldfusion/coding/strings/regex.cfm
Brian
-Original
Yes, that works much better than ColdMediaalthough coldmedia.org IS
available ;)
Brian
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 10:41 AM
To: CF-Talk
Subject: RE: Macromedia Coldfusion
Oh, I don't know. What about
Do I understand correctly...you want to copy a table from datasource1 to
datasource2? Presuming the table already exists:
CFQUERY NAME="t1" DATASOURCE="brian"
select a from test1
/CFQUERY
cfoutput query="t1"
CFQUERY NAME="t2" DATASOURCE="brian"
insert into test2 values
Ok, I stand corrected...I had tried it and it didn't work. Probably a
syntax error.
From my original answer then, you would replace the call to the stored proc
with a CFQUERY to create the table.
Brian
-Original Message-
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday,
There is also a CF Function to deal just with single quotes in data, oddly
enough called PreserveSingleQuote. Double quotes inside single-quoted text
shouldn't be a problem.
The following code bombs...
CFSET var="Brian's Book"
CFQUERY...
insert into table values ('#var#)
/CFQUERY
This code
When two boxes are unselected, their values are the same. Add a statement
to make sure one of the values is also checked.
For clarity's sake, I'd also rewrite the code this way. In 6 months, you
might have to look at this again and the more you can break it down, the
better it will be then.
A comment here:
First of all, I'm in agreement; I really hate getting vacation notices from
lists...because I'm NOT on holiday ;) Of course, I didn't think about it,
so I'm probably one of the guilty party that send an OOO notice to the list
(oops - sorry)
However, I'm not sure the proposed
Let me see if I can help clarifyyou're asking if CF can be used as the
front end for a complex database?
The answer is...OF COURSE! And it will do it in a much more maintainable
way than ASP will.
If the database is properly designed, it doesn't matter what front end you
put on it.
If
Another pseudo code way to do this...
Set date=Jan 1, yourYear
loop
if DayOfWeek(date)=yourDay then exit loop
date=DateAdd(d,1,yourDate)
end loop
// Assert that date is earlier than Jan 8th
// You have the first date
loop
date=DateAdd(d,7,yourDate)
exit when DatePart(, date) is
Huh? SSL is a delivery method, a networking thing. Custom Tags are at the
application level. Technology wise we're talking apple and oranges.
What he might have been trying to say is that you SHOULDN'T use custom tags
on something that you want to be secure. Extend that as a company policy
I'm not exactly sure what you're talking here. My understanding is that
CFGRID is used as a CF tag inside a file.
CFGRID name="name" height="height"...
CFGRIDCOLUMN NAME="col1" HEADER="head1"
/CFGRID
Brian
-Original Message-
From: Tony Turner -CFUG [mailto:[EMAIL
Try Javascript - use the onChange event for the "Check All" box to execute a
JS function that checks all the other boxes.
Brian
-Original Message-
From: Bosky, Dave [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 3:08 PM
To: CF-Talk
Subject: checking multiple boxes w/single
First thing that comes to my mind is a loop counter:
cfset counter=1
cfloop query="test" startrow="1" endrow="#rows.RecordCount#"
cfif cfloop.row EQ 1
We are on row 1
cfelse cfloop.row GT 1
We are not on row 1
/cfif
cfset counter =
As a general resource:
http://dir.yahoo.com/Computers_and_Internet/Communications_and_Networking/Be
nchmarks/ Hopefully theres something there that would be useful.
Brian
-Original Message-
From: Bud [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 08, 2001 10:51 AM
To: CF-Talk
Sorry, but I have to comment -
(engage soapbox mode)
Managers that choose ASP over CF are showing that they have no business
being a manager. I've done both. My first reaction to ASP was "Why is this
so difficult?" My first reaction to CF was "Wow, someone finally made it
simple." Anyone
Well, it would be funny if...
Something I've found is that CF Studio won't catch this. I spent over an
hour looking for this same typo a few weeks ago. While looking, I set
comments to highlight yellow...when I found it, I noticed that although I
only had -- to close it, CFS stopped tracking
A suggestion to get running quickly.
I've done this before by writing a stored procedure that acted in the WHERE
clause. Inside the stored procedure, I'd loop over a select statement until
I ran out of data or found what I was looking for...NOT EFFICIENT at all,
but it will get you going if
Just to add a comment to what everyone else has said - I've always seen
different syntax on this.
select SUM(Number) "NUMBER"
from Tbl_Numbers
May be an Oraclism or just local teaching. I'm not that well versed in the
differences between MSSQL and Oracle SQL.
Brian
-Original Message-
In Oracle, you can query user_tab_columns or dba_tab_columns (where
owner='#SCHEMA_NAME#) to find this information. Specifically, you're
looking for the data_type field.
Brian
-Original Message-
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 7:49 AM
To:
A question - are you sure you mean to use WEEK_DAY as the variable there.
Judging from where you use #DayOfWeekAsString(week_day)#, it would appear
that WEEK_DAY is a number from 1-7, not a DAY_OF_MONTH from 1-[28..31] as
you appear to use it.
If this is the problem, it appears in the query in
Create a database view that UNIONs all the tables. Each year, alter the
view to include the new archived table.
Of course, this doesn't solve the problem that you still have to weed
through 60K rows of data...there is no solution to that problem. You have
60K rows that you have to look at and
I would like to write a statement that gives me a list of all users in the
"teaserusers" table and the last "logdate" entered into the table for each
user listed.
Here's the way I'd think about that:
SELECT t.userid,
t.nickname,
t.firstname,
t.lastnames,
t.email,
Do you mean in the source or the displayed HTML? I'm not sure of the
question.
If you mean the source, look at your cfoutput statement as being a loop.
Every time your code goes through the loop, it executes the code as if there
were multiple lines. The line that contains the CFOUTPUT doesn't
I believe the answer is nomainly because there is no way in SQL to
insert multiple rows at once. Even the batch loaders such as SQL*Loader
only do it one row at a time.
Beyond that, there is also no way to access all the data inside an array
without looping over each row.
Brian
In your CFOutput, use an if statement to detect when the query record num is
odd. When it is, print a /td/trtrtd to move to the next row of the
table.
Rather than
cfoutput
tr
td#print data#/td
td#print data#/td
/tr
/cfoutput
Use:
trtd
cfoutput
#print data#/tdtd
cfif query record num
A few:
- On your form page, you should be able to use Javascript to do this too.
When onSubmit fires, disable the button, then use onChange on every field to
enable the button.
- On your action page, do a lookup first to see if the data has already
been submitted.
- You may be able to prevent
It looks sort-of like a cross between a KDE, Mac and
BeOS. It is pretty slick, though It's a little too
slow for mainstream use, IMO.
So you're saying its a bit like Windows too, huh?
};-
Brian
~~
Structure your ColdFusion code
Ok, you have me intrigued. Are you talking about a PL/SQL procedure that
takes the entire array and then parses it? Won't you be looping through the
array anyway?
Brian
-Original Message-
From: Eric Barr [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 19, 2000 11:31 AM
To: CF-Talk
What does the data look like?
You'll probably want to use GetToken, SpanExcluding and SpanIncluding
functions to tokenize the data.
Brian
-Original Message-
From: ibtoad [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 18, 2000 9:51 AM
To: CF-Talk
Subject: RE: Parsing??
OK, I am
Anyone know this? I don't see it in the documentation, so I suspect the
answer is no...
When using CFGrid, is it possible to have some cells display in the format
of a HTML select box? Would be very cool
Brian
~~
Structure your
Well, let me make sure first - you are dealing with real dates, right? Not
string representations of dates?
Dealing with real dates, you can use simple compare operations - LT, EQ and
GT to bracket a range. If you're dealing with stringsuI'd
really suggest that you get them into
Here's a link that I find useful...
http://www.psyberspace.net/coldfusion/coding/strings/regex.cfm
Brian
-Original Message-
From: Bruce Heerssen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 11:08 AM
To: CF-Talk
Subject: RE: RegEx to strip HTML
Tom,
While we're on the
A reasonable guess:
Servers have a limit on the number of transactions they can handle at one
time without doing a commit. I don't remember specifics, so I'm not even
going to guess at the size. From what I can see, this sounds like the
server is filling up its transaction buffer and dumping
Call me silly - but Oracle doesn't support it, does it?
I know I've always used :
select PuddingName
from PuddingTable
where rownum 2
order by PuddingID desc
to get the top 2 rows
Brian
-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 10,
I already had tried it and it didn't work. Thought you might know something
I didn't. Unless someone else has input, I've finally found something that
Access does that Oracle doesn't. Not that Oracle doesn't have that
functionality, it just does it differently.
Brian
-Original
80 matches
Mail list logo