RE: Need to optimise query performance
As someone else has mentioned, SQL Server cursors are not super efficient. Often, there is a non cursor alternative to what you are trying to do. For example, if you have a identity column (or a column you know to be unique) in the table you want to iterate over, you can use this trick to avoid a cursor. declare @CurId int select @CurId = min(Table.IdentityCol) from Tables where (your where criteria) while (@CurId is not null) begin - do your stuff here, use the value of @CurId to grab the row you want to work with ... - then get the next id value select @CurId = min(Table.IdentityCol) from Tables where (your where criteria) AND Table.IdentityCol > @CurId end If you simply can't avoid a cursor, you could look at the links below. They both have some good basic cursor performance suggestions. http://www.sql-server-performance.com/cursors.asp http://www.swynk.com/friends/achigrik/UseCursor.asp#part_2 HTH, -Original Message- From: Vishal Narayan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 1:08 AM To: CF-Talk Subject: Need to optimise query performance We are running our website on CF4.5 with Win 2K, IIS5 and SQL 2000 DB on another WIN2K machine. I have a few highly database intensive pages that are placing a Iot of load on my database server - executing them pushes up CPU utilisation to 100% for a few seconds ! The resultsets are usually large, in thousands of rows. I have implemented paging, i.e. showing only 20 records to a page, with previous and next buttons at the bottom. I have created stored procedures to perform these queries and retrieve the resultsets. SELECT @CURSORSTR = 'DECLARE GETRES CURSOR FOR SELECT cnd_ID FROM candidatemaster r inner join category c on (r.cat_id1=c.cat_id or r.cat_id2=c.cat_id or r.cat_id3=c.cat_id) WHERE ((r.blocksearch=0) and (r.delete_flag=0) and (c.delete_flag=0)) AND (c.cat_id= ' @value') AND (r.ctry_id = ' @countryid') ) Order by CND_UPDATE_DATE DESC EXEC (@CURSORSTR) OPEN GETRES BEGIN -- HERE I LOOP THROUGH THE CURSOR AND GET ONLY THE 20 CND_IDs TO BE SHOWN CURRENTLY, DEPENDING ON THE INPUT PARAM FOR PAGE NUMBER, AND ADD THEM TO A STRING CALLED @cndlist -- END CLOSE GETRES DEALLOCATE GETRES SELECT @SQLSTRING = 'Select *,ctry_name,ct1.cat_name as cat1, ct2.cat_name as cat2, ct3.cat_name as cat3 from candidatemaster inner join countrylist on candidatemaster.ctry_id=countrylist.ctry_id inner join category ct1 on cat_id1=ct1.cat_id left join category ct2 on cat_id2=ct2.cat_id left join category ct3 on cat_id3=ct3.cat_id where cnd_id in (' EXEC (@SQLSTRING + @cndlist + ') Order by CND_UPDATE_DATE DESC') In the template that calls the stored proc, we get the resultset as a cfquery object called getres. --CFPROCPARAMS DECLARED HERE --- -- DISPLAY 20 RESULTS HERE -- One of the CFPROCPARAMS is the page number, which tells the stored procedure which 20 records to retrieve. I need to improve the performance of these pages and there are three ways I can approach this problem : 1. Code level changes : is there anything wrong with the queries themselves ? Can I do this more efficiently ? Note that in the stored proc, I could have merged both the queries - query 1 can go into the where clause of query 2. But I broke up the two so that I could get only the 20 cnd_Id's that I require from the cursor created by query 1. The plus point is that the second query needs to get only 20 records, as opposed to several thousand. The drawback is that I have to loop through the cursor in query 1 to get the 20 cnd_Id's. 2. Design level changes : Should I simply put an upper limit on the number of matches to be retrieved ? Query 1 retrieves several thousand cnd_id's typically, and this number will only grow with time. Should I limit this ? 3. Performance tuning at DB level and database optimisation: I've already tried the following : - primary keys for all tables in use - indexes on all columns used for joins Is there anything else I can do towards performance tuning ? Could I use views to reduce the load on my SQL 2000 DB ? Would appreciate suggestions on any of the three approaches. Which one should help most ? Vishal. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cflocation url length
I don't think so. If I do a HTTP GET on the url it works fine. Only when using cflocation is there a problem. -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 6:25 PM To: CF-Talk Subject: RE: cflocation url length it's a browser thing :) I recall a convo where IE was restricting limits. the question is, what the heck are u passing?! -Original Message----- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 5:17 PM To: CF-Talk Subject: cflocation url length I've noticed that cflocation seems to fail when the url argument is very long, for example > 850 chars. I think I remember seeing somewhere that CFLOCATION actually implements an HTTP 302 Redirect. Is there something in the html headers which is restricts the url length, or is this an artificial restriction imposed by cflocation? More pratically, has anyone determined the actual cutoff point where cflocation will fail? __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
cflocation url length
I've noticed that cflocation seems to fail when the url argument is very long, for example > 850 chars. I think I remember seeing somewhere that CFLOCATION actually implements an HTTP 302 Redirect. Is there something in the html headers which is restricts the url length, or is this an artificial restriction imposed by cflocation? More pratically, has anyone determined the actual cutoff point where cflocation will fail? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Killing Client vars session on closing browser.
Hmm, that is strange. Couple of questions... How are you determining that a user needs to be redirected to the login page? Are you using cflocation anywhere which might be preventing the cookie overwrite from happening correctly? Are you using UUIDs for cftokens? -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 10:12 PM To: CF-Talk Subject: RE: Killing Client vars session on closing browser. Ok, here's another part of the mystery how could this be? I closed all copies of all browsers. I used SQL Query Analyser to go to the CDATA table and delete the records relating to my client session. Then I opened my browser and went to the protected page. As expected I was sent to the login page. So far so good. But when I completed logging in, the CFID and CFTOKEN were the same as the one I had just deleted!! I didn't believe what I was seeing, so I did it again a couple more times.Same result. I thought the CFIDs and CFTOKENS were supposed to be unique and never reused. What gives? How can I log in fresh and get the same CFID and CFTOKEN as I had before? (If it's relevant, we're using CF5 and my browsers are IE6.0.26, and NN4.75, and NN6.2.2) Cheers, Mike Kear Windsor, NSW, Australia AFP WebWorks -Original Message- From: Matthew Friedman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 11:22 AM To: CF-Talk Subject: RE: Killing Client vars session on closing browser. Mike here is a thought and this works for a project that I did. Open you site in a framed environment Frame one is 100% and this is where your application runs Have a hidden frame that is a simple html page with an onclose() function to call a page logout.cfm In logout run a query to delete your client variables from the database that you have designated delete from dbo.CDATA where cfid = '#cookie.cfid#:#cookie.cftoken#' and app = '' - this is the name from the cfapplication page that you are using for the client vars. then close the browser page with a JavaScript. This will guarantee that you have deleted the client vars from the time the user logs off. You will need to take this Idea on step furture to make sure that the user does not open the page outside of the framed enivorment and that can be done with some simple javascripting. Matt Friedman -Original Message- From: Mike Kear [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 8:40 PM To: CF-Talk Subject: RE: Killing Client vars session on closing browser. Yes, thanks Rob. That was my understanding of it too. And I had already used that code to convert CFID and CFTOKEN to memory cookies. But now, 8 hours after I closed my browser, I just came back on line, opened my browser again, and I was still logged in with the same CFID and CFTOKEN. So the client vars didn't time out, and they didn't disappear when not only did I close down my browser but I closed down my whole system for the night. That's why I asked the question. I didn't want to go over old ground, but half a dozen people have told me exactly the same thing - use that snippet to convert the cookies to in-memory cookies. BUT IT DOESN'T WORK FOR MY CASE. That's the problem. I don't know why. If you look at my original question ( re-posted below) you'll see that's what I originally said. Does that only apply to session variables? Because I'm using CLIENT Vars (it's a long story, just take it from me that client vars is the way we have to go) Or have I missed something? -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 4:04 AM To: CF-Talk Subject: RE: Killing Client vars session on closing browser. Correct me if I'm wrong, but I believe that eliminating a user's session id (aka CFID and CFTOKEN) will have the effect of orphaning their Client data. In other words, if you make sure that no users have persistant session cookies, when they close the browser, they will lose their CFID and CFTOKEN values which are used to hash their Client variables. If they return to your site in a new browser instance, they should be issued a new CFID and CFTOKEN pair, which effectively gives them a whole new Client variable space. Of course you should probably have your Client variables expire fairly frequently in this scenario. I believe some has already posted the code you can put in Application.cfm which will convert your CFID and CFTOKEN cookies from persistant cookies to in-memory cookies. -Original Message- Here's what I originally asked: At 07:51 AM 6/19/02, you wrote: >I'm maintaining state using CLIENT vars, and I want to have the session die >when the user closes his browser. > >I know how to kill SESSION vars by setting the CFID and CFTOKEN cookies to >expire, but that doesn't apply to client vars do
RE: Virtual Directories
Dave, thanks for the info >From my understanding of that article, the auto disconnect timeout is controlled by the server, is that right? If that is the case I don't think it will help in this particular situation. The Snap servers are running some sort of Linux based NTLM emulation software and as such are not true NT fileservers. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 5:42 PM To: CF-Talk Subject: RE: Virtual Directories > We have a IIS virtual directory to a SNAP server and it seems > that it gets dropped about every 60 seconds, and ColdFusion has > to wake it up. Basically we store images on this server and call > them from the web server. First time around if the connection is > severed we get broken images, hit refresh and bingo, there they > are. Anyone have any ideas on this one? Windows automatically disconnects network connections. You can control this behavior: http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q138365 Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Virtual Directories
I've had the exact same issue with our SNAP server. I think their NTLM emulation software is somewhat bunk. I've had alot of problems with it. What version of the SnapOS are you using? -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 5:01 PM To: CF-Talk Subject: Virtual Directories We have a IIS virtual directory to a SNAP server and it seems that it gets dropped about every 60 seconds, and ColdFusion has to wake it up. Basically we store images on this server and call them from the web server. First time around if the connection is severed we get broken images, hit refresh and bingo, there they are. Anyone have any ideas on this one? Kevin Schmidt __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cflock with timeout=0
Interesting. I found the exact opposite. CFLOCK behaved as I hoped it would. Here is my test script... -- did the lock done! - Basically the thing just loops for 15 seconds to give me time to call the page in a different browser. I found that the first instance will run for the entire 15 seconds and display did the lock done! The second instance appears to skip the locked section entirely and immediately displays done! So it would seem that either one of our scripts isn't testing the right thing or that CF5 and CFMX behave differently in this regard. -Original Message- From: James Ang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 2:06 PM To: CF-Talk Subject: RE: cflock with timeout=0 I thought this was an interesting question, and I decided to write a test script. And from my experiments with CFMX, it would seem that timeout=0 is equivalent to no-timeout. As in, the cf thread will wait() till it obtains the lock. My test script in essence created a deadlock. Something that I thought is not achievable in CFLOCK'ing since the timeout attribute is always required. But setting timeout=0 in essence allows for deadlock scenarios. Here's my deadlock example: I don't have a CF5 playbox to crash to verify if this is true for CF5. :P James Ang Senior Programmer MedSeek, Inc. [EMAIL PROTECTED] -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:02 AM To: CF-Talk Subject: RE: cflock with timeout=0 > Can anyone tell me what the behaviour of CFLOCK is when > you give it a timeout value of 0? What I'm looking to do > is create a situation where if one user has acquired the > lock, any other users who reach the lock will immediately > skip the synchronized section. I thought the following > might work... > > type="exclusive"> > ... > > > However, I can't find any documentation stating how CF > handles a value of 0 in the timeout field. Will it even > attempt to acquire the lock? In some languages a timeout > of 0 indicates "wait indefinetely" which is obviously > not what I want in this case. I'm running CF5 Pro. Well, I don't know the answer to your question, but you can easily find this out by simply writing some test pages with locks, and running them to see what happens. For example, you could place a lock around a long-running loop, and run that from two separate browsers, or even from one browser using a frameset. The answer that you get this way will be more reliable than any provided by the documentation, which often contains omissions, ambiguities, and even the occasional error. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
cflock with timeout=0
Can anyone tell me what the behaviour of CFLOCK is when you give it a timeout value of 0? What I'm looking to do is create a situation where if one user has acquired the lock, any other users who reach the lock will immediately skip the synchronized section. I thought the following might work... ... However, I can't find any documentation stating how CF handles a value of 0 in the timeout field. Will it even attempt to acquire the lock? In some languages a timeout of 0 indicates "wait indefinetely" which is obviously not what I want in this case. I'm running CF5 Pro. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: ColdFusion and NAS
Both IIS and CF will have to be able to access the NAS device. For CF this means that the user running the Cold Fusion Application Server needs read access to your networked drive (I'd suggest using a UNC path instead of a drive mapping). In IIS I think that you have to allow the anonymous user to read the network location. By default this user is %MACHINENAME%_Anonymous or something. I believe you can change that on the virtual site settings on the IIS admin. -Original Message- From: Yves Arsenault [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:52 AM To: CF-Talk Subject: ColdFusion and NAS Can anyone help us with this problem? I am running a Windows 2000 Server with IIS 5 and Coldfusion v5.0. I have the files on a shared network drive on a Procom NetFORCE 1700 Network Attached Storage box. I am using Active Directory internally for authentication and both the NAS box and the IIS server are part of the same domain. There is a user created that has access to the shared drives that the IIS is using to connect to the NAS box. I have several HTML and ASP sites that are also being hosted in this way with no problems. I am getting the following error when I try to get Coldfusion to run web pages from the networked drive on the remote machine: Error Occured While Processing Request Error Diagnostic Information An error has occured. HTTP/1.0 404 Object Not Found Will Coldfusion support networked drives and if so what needs to be done to get this working? I appreciate any help that you can provide. Peter Yves Arsenault Carrefour Infotech 5,promenade Acadian Charlottetown, IPE C1C 1M2 [EMAIL PROTECTED] (902)368-1895 ext.242 ICQ #117650823 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: How do Client Var Behave
The Client variables are specific to each application. Notice how the application name is stored along with the cfid and token in the database. -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:58 AM To: CF-Talk Subject: How do Client Var Behave Hello again. Got a problem. I declare an Application context(say APP1) with cfapplication. then I set some client variables... I then cflocation to anouther directory, with.. anouther declared Application context(say COOLAPP2) then I try to reference the client variables I set in APP1. --This Doesn't work-- :( My understanding is the whole point of Client varialbes is that they span application contexts. The above situation doesn't work...Is my understanding wrong? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Limits to textarea? (II): No solutions?
This is likely due to a setting on your datasource. In the cfadmin, go to your datasource, and hit the cfsettings button to get the advanced view. Toward the bottom there is a flag "Enable Long Text Retrieval". If you check it, your select should return the entire text column. However, as the administrator warns, there is a performance penalty for enabling this setting, which will effect all of your queries on that datasource. One thing you could do to get around this is have another datasource, DSN_LongText, which has the setting enabled. Then for normal queries use the normal datasource (w/o the long text setting), then when you know you will be selecting the text columns, use the _LongText datasource. That way you will only have to suffer the performance penalty when you need the long text functionality. -Original Message- From: JAAV [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 10:46 AM To: CF-Talk Subject: Limits to textarea? (II): No solutions? Hello, I have the same problem with w2k+MS SQL. I have a text field with 94000+ characters but when I try to do a query the DB returns me a 64.999 bytes (exactly) field. Any solutions to this issue? TIA Juan - Original Message - > From: "Russel Madere" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, January 14, 2002 8:59 PM > Subject: RE: Limits to textarea? > > > > Very interesting issue. > > > > Thanks for the info. I might give it a try on a Win 2K system with MS SQL > > to see if anything is different. In my copious spare time, of course. :) > > > > Russel > > > > -Original Message- > > From: Brian Scandale [mailto:[EMAIL PROTECTED]] > > Sent: Monday, January 14, 2002 11:41 AM > > To: CF-Talk > > Subject: RE: Limits to textarea? > > > > > > Hi Russel, > > > > I created a 10,000 character document with no spaces... > > 123456789012345678901234567890 etc... and cut and pasted it into the > > textarea box... > > > > After saving it I cut and pasted the result when querying it into msword > and > > then asked it to count the characters for me... 8194 was the answer. > > > > I then went to the database with another tool, (pgAdmin on NT against > > postgreSQL on a linux box), to find only 8194 characters. HOWEVER I was > > able to add more characters to the database vchar field via pgAdmin. So > it > > is not that the database can't, but rather I think that the CF > > server/postgreSQL ODBC driver combination can't. > > > > As an aside; it is interesting that 2^13 = 8192... And yes, 16 bits is > > 65536, the expected limitation. > > > > Brian > > > > > > > > At 10:34 AM 1/14/02 -0600, you wrote: > > >Out of curiousity, where are you getting the figure 8194? I have seen > that > > >number as a character limit on the size of a single record in MS SQL. > > > > > >Russel > > > > > >-Original Message- > > >From: Brian Scandale [mailto:[EMAIL PROTECTED]] > > >Sent: Monday, January 14, 2002 1:49 AM > > >To: CF-Talk > > >Subject: Limits to textarea? > > > > > > > > >Anyone know off hand what the limits are to a are? > > > > > >I just tested and found 8194 characters maximum with the extra being > > >truncated. > > > > > >But... that was only one config in one browser etc... > > > > > >thanks, > > >Brian > > > > > > > > > > > > > > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Bilingual App HELP!!
I've had to deal with similar issues on our site which has some bilingual sections. It's never easy and I don't know that there is a single good "catch-all" approach, but here is what I have found to work pretty well... Take a look at http://www.microjuris.com/Profile.cfm Profile.cfm is just a shell page which contains cf code as well as the page layout. The actual content is stored in html stub files. For each section of the profile there are two files (for example MarketPotential_EN.html and MarketPotential_ES.html). The current language is stored in a Cookie in this case, but it doesn't especially matter, Session or client vars work just as well. So then for each section I just cfinclude template="#SectionName#_#CurrentLanguage#.html". The graphics which are language dependant take a similar approach (ie Header_EN.gif and Header_ES.gif). This makes updating the content pretty trivial as there is no cf code change involved. Anyone familiar with basic html tags can edit the include pages, or use a WYSIWYG editor on them and be oblivious to the html. For shorter, more frequently used phrases like "Submit" or "Next" you may want to consider using variables or the database to store them along with their translations. The approach you take will probably depend on the type of content and how often it will be used. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:47 PM To: CF-Talk Subject: Bilingual App HELP!! Hey guys, any of yall Familiar with the Houston International Festival? Well it's like this festival that features music, dance, arts, and spotlights a different country every year. Well this year that country is MEXICO. And they want to have an English and Spanish version. I would like some ideas on methods on approaching this. Everything will be identical. Layout, grpahics. The only difference is the langage (and of course, text on the navigation buttons will change too). But i was wondering if there are any veterans :) Ideally, I would like to have only one copy, instead of an English copy and a Spanish copy. That way they use the same CFM code. A bulk of the site would be text and information. So i was thinking maybe I can just set the text to variables, and display the correct language depending on their preference. Just text only though! There will be only one HTML code, and only one CFM code to follow. So well, there you go! I appreciate any input, humour, pity :) snifflebear __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
cftry/catch scoping
If I have a cftry block which contains calls to custom tags, what happens if there is an error in one of the custom tags? I would expect that the exception would be thrown out and caught by the catch block of the cftry, but that doesn't seem to be the case. I'm still getting untrapped errors out of the custom tags. Can anyone confirm this, or am I doing something wrong? CF version is 5.0 Professional. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sorting problem
Okay, I just tried this in access. Very strange. Try this Select *, Len(Title) .. Order By Len(Title), Title In Access 2000 it seems to work if the expression you are sorting on is also in the select clause. Otherwise it does the Len sort but not the alpha sort. See if it works for you. -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:57 PM To: CF-Talk Subject: RE: Sorting problem Good idea, but that really got some weird results. My guess is Access just can't handle any of this. -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 2:50 PM To: CF-Talk Subject: RE: Sorting problem that weird. What about: order by Len(title), title that should group all the RD1-RD9 at the start then alpha sort them which should give you the results you want. Might want to use the trim functions inside the len(). -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:31 PM To: CF-Talk Subject: RE: Sorting problem Tried that. Then it doesn't sort properly - it's still going RD1, RD10... -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 2:24 PM To: CF-Talk Subject: RE: Sorting problem Instead of selecting it, why not just put the expression in the order by clause? i.e. order by Right(Title, Len(Title)-2) Then you don't have to worry about the aliasing. -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:04 PM To: CF-Talk Subject: RE: Sorting problem This looks like a winner, except Access 2000 doesn't recognize the aliased field for sorting purposes: SELECT d.*, right(title,len(title)-2) AS dsorter FROM docs d, doc_cats_lookup dc WHERE dc.category_id = #getyearcat.category_id# AND d.isapproved = 1 AND d.doc_uuid = dc.doc_uuid ORDER BY dsorter It can't find dsorter, even though I can list it out on the page. Ian -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 1:49 PM To: CF-Talk Subject: RE: Sorting problem When you do your select, if your db support its, select right(len(col)-2), this should return all of the info except for "RD". You then want to cast it to integer and then sort in your order by clause. On display, simply do: rd#col# === Raymond Camden, ColdFusion Jedi Master for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Ian Lurie [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 4:43 PM > To: CF-Talk > Subject: Sorting problem > > > I've got a database of codes that go like this: > RD1,RD2,RD3,RD4,RD5,RD6,RD7,RD8,RD9,RD10,RD11 and so on. > > Problem is, if you sort it, it ends up like this: RD1, RD10, > RD11, etc. > > Any great, simple way to make sure that they sort the way the > client wants: > RD1, RD2...RD9,RD10? > > Ian > > Portent Interactive > Helping clients build customer relationships on the web since 1995 > Consulting, design, development, measurement > http://www.portentinteractive.com > Talk with us: http://projects.portentinteractive.com > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sorting problem
that weird. What about: order by Len(title), title that should group all the RD1-RD9 at the start then alpha sort them which should give you the results you want. Might want to use the trim functions inside the len(). -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:31 PM To: CF-Talk Subject: RE: Sorting problem Tried that. Then it doesn't sort properly - it's still going RD1, RD10... -Original Message----- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 2:24 PM To: CF-Talk Subject: RE: Sorting problem Instead of selecting it, why not just put the expression in the order by clause? i.e. order by Right(Title, Len(Title)-2) Then you don't have to worry about the aliasing. -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:04 PM To: CF-Talk Subject: RE: Sorting problem This looks like a winner, except Access 2000 doesn't recognize the aliased field for sorting purposes: SELECT d.*, right(title,len(title)-2) AS dsorter FROM docs d, doc_cats_lookup dc WHERE dc.category_id = #getyearcat.category_id# AND d.isapproved = 1 AND d.doc_uuid = dc.doc_uuid ORDER BY dsorter It can't find dsorter, even though I can list it out on the page. Ian -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 1:49 PM To: CF-Talk Subject: RE: Sorting problem When you do your select, if your db support its, select right(len(col)-2), this should return all of the info except for "RD". You then want to cast it to integer and then sort in your order by clause. On display, simply do: rd#col# === Raymond Camden, ColdFusion Jedi Master for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Ian Lurie [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 4:43 PM > To: CF-Talk > Subject: Sorting problem > > > I've got a database of codes that go like this: > RD1,RD2,RD3,RD4,RD5,RD6,RD7,RD8,RD9,RD10,RD11 and so on. > > Problem is, if you sort it, it ends up like this: RD1, RD10, > RD11, etc. > > Any great, simple way to make sure that they sort the way the > client wants: > RD1, RD2...RD9,RD10? > > Ian > > Portent Interactive > Helping clients build customer relationships on the web since 1995 > Consulting, design, development, measurement > http://www.portentinteractive.com > Talk with us: http://projects.portentinteractive.com > > __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sorting problem
Instead of selecting it, why not just put the expression in the order by clause? i.e. order by Right(Title, Len(Title)-2) Then you don't have to worry about the aliasing. -Original Message- From: Ian Lurie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 5:04 PM To: CF-Talk Subject: RE: Sorting problem This looks like a winner, except Access 2000 doesn't recognize the aliased field for sorting purposes: SELECT d.*, right(title,len(title)-2) AS dsorter FROM docs d, doc_cats_lookup dc WHERE dc.category_id = #getyearcat.category_id# AND d.isapproved = 1 AND d.doc_uuid = dc.doc_uuid ORDER BY dsorter It can't find dsorter, even though I can list it out on the page. Ian -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 1:49 PM To: CF-Talk Subject: RE: Sorting problem When you do your select, if your db support its, select right(len(col)-2), this should return all of the info except for "RD". You then want to cast it to integer and then sort in your order by clause. On display, simply do: rd#col# === Raymond Camden, ColdFusion Jedi Master for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Ian Lurie [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 4:43 PM > To: CF-Talk > Subject: Sorting problem > > > I've got a database of codes that go like this: > RD1,RD2,RD3,RD4,RD5,RD6,RD7,RD8,RD9,RD10,RD11 and so on. > > Problem is, if you sort it, it ends up like this: RD1, RD10, > RD11, etc. > > Any great, simple way to make sure that they sort the way the > client wants: > RD1, RD2...RD9,RD10? > > Ian > > Portent Interactive > Helping clients build customer relationships on the web since 1995 > Consulting, design, development, measurement > http://www.portentinteractive.com > Talk with us: http://projects.portentinteractive.com > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE:
No, you are right. Mapped drives are specific to the currently logged in user. That's why UNC paths are much better in this case as they don't require the user to be actively logged in to work. -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 3:44 PM To: CF-Talk Subject: RE: mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 2:12 PM To: CF-Talk Subject: RE: > What user is CF running under? > > The user logged in that created the mapped drive letter > has Administrator privileges. That doesn't mean that the user account of the CF server will be able to see the drive mapping. By default, CF runs as SYSTEM, rather than as a specific user. You might find this helpful: http://www.defusion.com/articles/index.cfm?ArticleID=89 Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF & Linux
Just a guess as I don't use RDS (or really know anything about it) but it seems like the transfer mode RDS is using is ASCII, that might explain why the images are coming through scrambled. Not sure RDS is meant for binary transfers. If ftp is not an option because of security, have a look at secure copy (scp). -Original Message- From: Randell B Adkins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:36 AM To: CF-Talk Subject: Re: CF & Linux FTP is unfortunately not an option. If we can copy the CFM files via RDS why can we not copy Images the same way? >>> [EMAIL PROTECTED] 06/04/02 10:15 AM >>> use ftp On Tue, 4 Jun 2002, Randell B Adkins wrote: > I have a question that involves CF Studio 5 and Linux. > > Our server is Linux and it runs CF Server 5. > Our workstations use CF 5 and Windows 2K. > > Using RDS and we can download copies of all CFM files > to the local workstations without a problem. > > However if we attempt to copies IMAGES from the server > via RDS to the local workstations that they all come in > 1K byte and are corrupted. > > Any one experience this problem? > If so, how can I get around this without going to the > sevrer each time and making a copy on CD or Floppy > and going back to the workstation. > > Thanks in advance! > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Check for file existence
How about: FileExists(file) -Original Message- From: phumes1 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:19 AM To: CF-Talk Subject: Check for file existence I need to check if a file exists on the server and if so, run some code. Whats the best way to check if the file "test.txt" exists in a directory The below doesn't seem to work. Note that the filename can change but the file extension (.txt) will stat the same. Found Match No Match +--- + Philip Humeniuk [EMAIL PROTECTED] [EMAIL PROTECTED] +--- -+ __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cf_ vs cfmodule (was: Quick question on custom tags)
the udf was cfincluded within the timed block but outside of the loop. -Original Message- From: Won Lee [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:52 PM To: CF-Talk Subject: RE: cf_ vs cfmodule (was: Quick question on custom tags) How did you call the UDF? Was the UDF just written on the page, cfincluded, put into a memory scope, or some other method? At 02:04 PM 5/31/2002 -0400, you wrote: >Good point Zac, > >For the curious I did the N=10,000 test with a udf (exact same >functionality) replacing the custom tag. > >results: > >10,000 calls in 1833 ms, or about 9 times as fast as cfmodule! > > > >-Original Message- >From: Zac Spitzer [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 31, 2002 1:40 PM >To: CF-Talk >Subject: Re: cf_ vs cfmodule (was: Quick question on custom tags) > > >-BEGIN PGP SIGNED MESSAGE- >Hash: SHA1 > >|1 tag calls: >|CF_ = 15262 ms >|CFMODULE = 20509 ms > > >ok compare that to a UDF function or just including the the file as an >cfinclude and >you will see why OO is nice but plain old linear code is fast > >lots of overhead with cfmodule > >z >-BEGIN PGP SIGNATURE- >Version: GnuPG v1.0.6-2 (MingW32) >Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >iEYEARECAAYFAjz3tXwACgkQm98oI6K7h0jjogCgswkSD63N1VaMSaJ3xd5ggUn2 >MwwAoNSt39l0WvqlS6pORX5W4OY4oLbA >=WLWt >-END PGP SIGNATURE- > > > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cf_ vs cfmodule (was: Quick question on custom tags)
Good point Zac, For the curious I did the N=10,000 test with a udf (exact same functionality) replacing the custom tag. results: 10,000 calls in 1833 ms, or about 9 times as fast as cfmodule! -Original Message- From: Zac Spitzer [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 1:40 PM To: CF-Talk Subject: Re: cf_ vs cfmodule (was: Quick question on custom tags) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 |1 tag calls: |CF_ = 15262 ms |CFMODULE = 20509 ms ok compare that to a UDF function or just including the the file as an cfinclude and you will see why OO is nice but plain old linear code is fast lots of overhead with cfmodule z -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6-2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAjz3tXwACgkQm98oI6K7h0jjogCgswkSD63N1VaMSaJ3xd5ggUn2 MwwAoNSt39l0WvqlS6pORX5W4OY4oLbA =WLWt -END PGP SIGNATURE- __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cf_ vs cfmodule (was: Quick question on custom tags)
-Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 1:25 PM To: CF-Talk Subject: RE: cf_ vs cfmodule (was: Quick question on custom tags) Can I ask, which version of the server this is? In CF4 and 4.5, I know it's true, not done extensive (only simple) testing on 5 and not touched MX for this yet > Testing was done on W2K Pro/IIS/CF5. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
cf_ vs cfmodule (was: Quick question on custom tags)
Phillip, I'm not sure what you mean by "naturally faster due to the way it's calling the custom tag". Anyway, I got curious about this and rigged up a very simple test. I wrote a simple custom tag which just displays the current time. The tag file is located in a directory which is both included in the custom tag paths of CFAdmin and also has a CF mapping to make it usuable with CFModule. I created two identical templates which looped and called the tag N times and used the GetTickCount function before and after the loop to see how long it took. The only difference in the templates is that in one loop I do and in the other I do . The results of this are listed below. Note that in between each test I restarted the cf service so as to clear out any kind of template mapping/caching CF might be doing. Testing was done on W2K Pro/IIS/CF5. 1 tag call: CF_ = 0-20 ms CFMODULE = 0-20 ms 10 tag calls: CF_ = 30 ms CFMODULE = 30 ms 100 tag calls: CF_ = 150 ms CFMODULE = 210 ms 1000 tag calls: CF_ = 1392 ms CFMODULE = 1913 ms 2000 tag calls: CF_ = 1422 ms CFMODULE = 2023 ms 1 tag calls: CF_ = 15262 ms CFMODULE = 20509 ms As you can see, the CF_ calling convention is consistently faster than cfmodule. Obviously this was not a perfect or even realistic test since I doubt you'd ever be calling the same tag 100 times on one page. Also, the custom tag file was at the root of the CustomTag path so CF did not have to scan subdirectories to find it (however there were 4 other custom tag paths installed on the server for whatever that's worth). Even on the first call to a template, where I might think cfmodule has an advantage due to the explicit template path, I was unable to find a consistant winner one way or the other. Based on what I've seen here I have a hard time supporting the statement that cfmodule is faster than cf_. Anyway, it was a fun way to kill a half hour. -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:26 AM To: CF-Talk Subject: RE: Quick question on custom tags > Are there any internal implemenation details which make > cfmodule faster than the cf_ syntax, or was this what you > were refering to? Just curious... CFMODULE naturally runs faster than CF_, it's to do with the way it's calling the custom tag There are general issues with using CF_ and the server caching the code, but that can be got around General advice is to use CFMODULE anyways, it doesn't look as "pretty" in the code, but it does work better Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL server trouble
If you are able to figure out what service is grabbing 1433 ahead of sql server, I'd suggest changing the startup parameter for that service to manual to allow sql to get it first. Of course you then have to remember to manually start that other service after every reboot. -Original Message- From: Mario Martinez [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 2:23 PM To: CF-Talk Subject: Re: SQL server trouble Tony: This file you are taking about does not contain any info about port 1433. You can be sure I did a search in microsoft site before going to the list , although I did not find the right keyword combinations at the begining . After making a cousious search in the SQL Errorlog I found the right keyword combination. thanks friend regards Mario - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, May 30, 2002 2:11 PM Subject: RE: SQL server trouble > just out curiosity. I wonder, if the next time this happens, if you viewed > the services file, (c:\winnt\system32\drivers\etc\services) if it would tell > you what is hooked on that port. if it does, then you know what app is the > culprit. > > Anthony Petruzzi > Webmaster > 954-321-4703 > [EMAIL PROTECTED] > http://www.sheriff.org > > > -Original Message- > From: Mario Martinez [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 1:46 PM > To: CF-Talk > Subject: Re: SQL server trouble > > > Thank you for your responses friends. > I finally found the answer in www.microsoft.com in the troubleshouting > section. > The problem was that somehow one winsock service(as the port asiggment is > dinamically on it) was steeling the 1433 port and SQL server could not > listen in 1433 port. What I did was to stop all the services except the > defaults, restart the SQL service and restart the others services again, in > this way SQL server takes this port firts. > I have to work around it because it could happen again anytime > I restart the machine. > > Thanks for your concern > > regards Mario > - Original Message - > From: "Rob Baxter" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, May 30, 2002 12:32 PM > Subject: RE: SQL server trouble > > > > check to make sure your SQL server is listening on tcp port 1433 (unless > you > > have changed the default port). You can either do a netstat -an from the > sql > > box or from the client machine try > > > > telnet sql-server-ip 1433 > > > > If you get a response your traffic is getting through. If not you've > either > > got something in the way (firewall) or a problem with your SQL network > > libraries. I actually just had this problem yesterday so if that is it > I'll > > tell you what worked for me. Have you made any configuration changes to > SQL > > recently? > > > > > > > > -Original Message- > > From: Mario Martinez [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 30, 2002 12:10 PM > > To: CF-Talk > > Subject: SQL server trouble > > > > > > Hi all friends: > > > > I got a coldfusion system with an SQL server . Today I came in here and I > > realize that I can't connect this SQL server from any other computer > through > > ODBC . I could do that before , now none of my remotly ODBC connections > are > > working > > This is the error I receive when I try to connect remotly: > > Connection failed > > SQLState:'01000' > > SQL Server Error: 10061 > > [Microsoft][ODBC SQL Server Driver ][TCP/IP > > Sockets]ConnectionOpen(connect()). > > Connection failed: > > SQLState: '08001' > > SQL Server Error: 11 > > [Microsoft][ODBC SQL Server Driver]General network error. Check your > network > > documentation. > > > > Any ideas will be more than appreciate. > > regards > > Mario > > > > > > > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: JRun in CF a security risk?
Deanna, Macromedia released a patch recently to fix a buffer overflow exploit in JRun 3.x See http://www.macromedia.com/v1/handlers/index.cfm?ID=22994 The bulletin indicates it only effects JRun. A notice about the patch was posted to the NT BugTraq mailing list yesterday, so perhaps your admin saw it there and that is what he is referring to. On a more general level, I'm not even sure what JRun components are part of CF5 so I really can't say. Maybe someone from MM can help. -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 1:48 PM To: CF-Talk Subject: JRun in CF a security risk? Hi Folks, My server administrator just asked me to look into something that he heard about the jrun components in CF 5.0 being some sort of a security risk. He didn't elaborate further, though. So, I'm not sure what he's referring to. Has anyone else heard of this issue? (I tried searching on the macromedia site, but didn't find anything, and the cf-talk archive search isn't working right now.) Thanks! -Deanna Deanna Schneider Interactive Media Developer [EMAIL PROTECTED] __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Quick question on custom tags
Why is cfmodule faster? I assume it might be a bit faster on the first call to a tag since the cf_ method requires that CF search the tree of installed tags to find the correct template to run, whereas with cf module you can specify the exact location. However, I've noticed that CF seems to cache the location of recently used custom tags, probably to address this very issue. So presumably, subsequent calls using cf_ or cfmodule would perform the same. Of course I have no idea on how long this cache persists or what it's maximum size might be, so in general it's probably safe to say cfmodule is slightly faster. Are there any internal implemenation details which make cfmodule faster than the cf_ syntax, or was this what you were refering to? Just curious... -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 12:54 PM To: CF-Talk Subject: RE: Quick question on custom tags Nah, it works happily - in fact, http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Quick question on custom tags
Ah, thanks guys. I wasn't aware you could have tag. Good to know. One question, and maybe this is what Pascal meant in his original reply. What happens if in my custom tag I call another ? Will the parser barf? -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 12:27 PM To: CF-Talk Subject: Re: Quick question on custom tags Rob, You are incorrect, you can use the start stop ... Blah Blah works just fine with the execution modes. Paul Giesenhagen QuillDesign > One problem with cfmodule is that you cannot take advantage of the ThisTag > type functionality you get from using the different execution modes. In > other words you can't have tags like > > > blah blah > > > I think someone else alluded to it, but starting with CF5 you can add > additional custom tag paths via the CF administrator. when you call > CF will search the depth of the custom tag tree(s) looking > for a file called MyCustomTag.cfm. > If you have 2 tags with the same name it will use the first one it finds > (you will see warnings about this in one of the server logs). > > > > -Original Message- > From: Eric J Hoffman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 11:14 AM > To: CF-Talk > Subject: RE: Quick question on custom tags > > > Use to call it.Regards, > > Eric J. Hoffman > Director of Internet Development > DataStream Connexion, LLC > (formerly Small Dog Design) > > -Original Message- > From: Brian Eckerman [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 10:05 AM > To: CF-Talk > Subject: Quick question on custom tags > > > Is it possible to call a custom tag that resides in a folder other than > the current folder. > > I am using but I would like to have one copy > residing in a "commonfiles" folder at root. > This would take something like <../cf_cf_formurl2attributes> right? It > doesn't seem to work. > > Any help is appreciated. > > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL server trouble
check to make sure your SQL server is listening on tcp port 1433 (unless you have changed the default port). You can either do a netstat -an from the sql box or from the client machine try telnet sql-server-ip 1433 If you get a response your traffic is getting through. If not you've either got something in the way (firewall) or a problem with your SQL network libraries. I actually just had this problem yesterday so if that is it I'll tell you what worked for me. Have you made any configuration changes to SQL recently? -Original Message- From: Mario Martinez [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 12:10 PM To: CF-Talk Subject: SQL server trouble Hi all friends: I got a coldfusion system with an SQL server . Today I came in here and I realize that I can't connect this SQL server from any other computer through ODBC . I could do that before , now none of my remotly ODBC connections are working This is the error I receive when I try to connect remotly: Connection failed SQLState:'01000' SQL Server Error: 10061 [Microsoft][ODBC SQL Server Driver ][TCP/IP Sockets]ConnectionOpen(connect()). Connection failed: SQLState: '08001' SQL Server Error: 11 [Microsoft][ODBC SQL Server Driver]General network error. Check your network documentation. Any ideas will be more than appreciate. regards Mario __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Quick question on custom tags
you're right, I just poorly phrased my answer. What I meant was that you lose the ability to take action between the start and end execution modes. Because I don't think when you call cfmodule there is an end execution mode. To me, the real benefit of having start/end tags in your custom tags is that you can just embed content between them and then you have access to it in the end execution mode of your tag. You lose this functionality when using cfmodule. -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 11:57 AM To: CF-Talk Subject: RE: Quick question on custom tags This is not true. You can perfectly use the ThisTag scope with cfmodule. In fact, I do it all the time. You have to be carefull with nesting s. Pascal Peters Certified ColdFusion Advanced Developer Macromedia Certified Instructor LR Technologies Av. E. De Mot, 19 1000 BRUSSELS, BELGIUM Tel: +32 2 639 68 70 Fax: +32 2 639 68 99 Email: [EMAIL PROTECTED] Web: www.lrt.be -Original Message----- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: donderdag 30 mei 2002 17:47 To: CF-Talk Subject: RE: Quick question on custom tags One problem with cfmodule is that you cannot take advantage of the ThisTag type functionality you get from using the different execution modes. In other words you can't have tags like blah blah I think someone else alluded to it, but starting with CF5 you can add additional custom tag paths via the CF administrator. when you call CF will search the depth of the custom tag tree(s) looking for a file called MyCustomTag.cfm. If you have 2 tags with the same name it will use the first one it finds (you will see warnings about this in one of the server logs). -Original Message- From: Eric J Hoffman [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 11:14 AM To: CF-Talk Subject: RE: Quick question on custom tags Use to call it.Regards, Eric J. Hoffman Director of Internet Development DataStream Connexion, LLC (formerly Small Dog Design) -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:05 AM To: CF-Talk Subject: Quick question on custom tags Is it possible to call a custom tag that resides in a folder other than the current folder. I am using but I would like to have one copy residing in a "commonfiles" folder at root. This would take something like <../cf_cf_formurl2attributes> right? It doesn't seem to work. Any help is appreciated. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Quick question on custom tags
One problem with cfmodule is that you cannot take advantage of the ThisTag type functionality you get from using the different execution modes. In other words you can't have tags like blah blah I think someone else alluded to it, but starting with CF5 you can add additional custom tag paths via the CF administrator. when you call CF will search the depth of the custom tag tree(s) looking for a file called MyCustomTag.cfm. If you have 2 tags with the same name it will use the first one it finds (you will see warnings about this in one of the server logs). -Original Message- From: Eric J Hoffman [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 11:14 AM To: CF-Talk Subject: RE: Quick question on custom tags Use to call it.Regards, Eric J. Hoffman Director of Internet Development DataStream Connexion, LLC (formerly Small Dog Design) -Original Message- From: Brian Eckerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:05 AM To: CF-Talk Subject: Quick question on custom tags Is it possible to call a custom tag that resides in a folder other than the current folder. I am using but I would like to have one copy residing in a "commonfiles" folder at root. This would take something like <../cf_cf_formurl2attributes> right? It doesn't seem to work. Any help is appreciated. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: XML output
oops, there it is. never mind... -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 11:18 AM To: CF-Talk Subject: RE: XML output i'm not sure about that... i've been using the samples given by SOXML v1.6 XML Interface for Allaire's ColdFusion. The example of converting cf to xml is a cfm page and yet it creates the xml code properly. -Original Message- From: James Maltby [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:55 AM To: CF-Talk Subject: RE: XML output Yup - your browser will only do this if it has the extension ".xml" -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 15:56 To: CF-Talk Subject: RE: XML output Thanks. It now displays on the browser, but as plain text. The browser still does not see it as an xml doc and therefore does not allow me to collapse expand the branches of the xml document. Any ideas? -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:43 AM To: CF-Talk Subject: RE: XML output Try enclosing your XML variable in the tags IE #xmlfeed# -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 9:46 AM To: CF-Talk Subject: XML output I'm trying to output an xml page on IE. This is the code i'm using: #xmlfeed# All i get is a blank page. I can see the xml generaged when i view the source of that page. Do i need to set other types of content on the cf content tag? Thanks for all input! Andres Andres Leon [EMAIL PROTECTED] Vitacost.com 2049 High Ridge Road Boynton Beach, Fl 33426 1.800.793.2601 x 225 __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: XML output
Not sure it is the problem, but I didn't see an xml header... -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 11:18 AM To: CF-Talk Subject: RE: XML output i'm not sure about that... i've been using the samples given by SOXML v1.6 XML Interface for Allaire's ColdFusion. The example of converting cf to xml is a cfm page and yet it creates the xml code properly. -Original Message- From: James Maltby [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:55 AM To: CF-Talk Subject: RE: XML output Yup - your browser will only do this if it has the extension ".xml" -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 15:56 To: CF-Talk Subject: RE: XML output Thanks. It now displays on the browser, but as plain text. The browser still does not see it as an xml doc and therefore does not allow me to collapse expand the branches of the xml document. Any ideas? -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 10:43 AM To: CF-Talk Subject: RE: XML output Try enclosing your XML variable in the tags IE #xmlfeed# -Original Message- From: Andres [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 9:46 AM To: CF-Talk Subject: XML output I'm trying to output an xml page on IE. This is the code i'm using: #xmlfeed# All i get is a blank page. I can see the xml generaged when i view the source of that page. Do i need to set other types of content on the cf content tag? Thanks for all input! Andres Andres Leon [EMAIL PROTECTED] Vitacost.com 2049 High Ridge Road Boynton Beach, Fl 33426 1.800.793.2601 x 225 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Memory problems
Well, why do you think he's moving the list archive out of Access? Up to a certain amount of traffic/data MS Access is a decent solution. After that it's a 'disaster waiting to happen' to quote Michael himself. I'd definetely begin considering other alternatives, ASAP. -Original Message- From: Dave Hannum [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 3:09 PM To: CF-Talk Subject: Re: Memory problems Owen, I doubt that the size of your files is the problem. Michael D. runs the CF-talk list with an Access database (or did until just recently). Have you got the latest MS Jet drivers? Access 2000 is much more stout than 97. Perhaps the latest ODBC drivers would be a quick short term fix. Dave - Original Message - From: "Owen Leonard" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 2:42 PM Subject: Re: Memory problems So, the consensus is Access is the problem! I wonder if the memory problems have gotten worse in the past couple of months because of the growing size of the database? > I think in the cfusion\bin directory there is a batch file provided that > sets up your scheduler to restart cf services at 2am (or so). So running Cycle.bat sets up the scheduler? Or do I need to schedule Cycle.bat to be run? I guess conversion to MySQL is now on the top of the pile after vacation. -- Owen > We've been having problems lately with our server running out of memory. __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Memory problems
Two questions.. 1) How big are you access dbs? After a couple million records access tends to go belly up... 2) are you using connection pooling? Access memory leaks will kill you if you have the "maintain db connectoins" box checked in the ODBC administrator -Original Message- From: Owen Leonard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:43 PM To: CF-Talk Subject: Re: Memory problems So, the consensus is Access is the problem! I wonder if the memory problems have gotten worse in the past couple of months because of the growing size of the database? > I think in the cfusion\bin directory there is a batch file provided that > sets up your scheduler to restart cf services at 2am (or so). So running Cycle.bat sets up the scheduler? Or do I need to schedule Cycle.bat to be run? I guess conversion to MySQL is now on the top of the pile after vacation. -- Owen > We've been having problems lately with our server running out of memory. __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL query question
All I can quickly come up with would be to use self-joins for every attribute/value pair. select A.DocId from attrib_xref A inner join attrib_xref B on A.DocID = B.DocID where A.attribId = 12 and B.attribId = 24 and A.attribValue = 'some text' and B.attribValue = 'some other text' ... You'll have to dynamically write out the sql, adding another self join for every pair you want to search for. It should work, but it's gonna be dog slow I would think. Hopefully someone else can find a better solution for you... -Original Message- From: Dirk Sieber [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:02 PM To: CF-Talk Subject: SQL query question Hi everyone, Okay, I've been struggling with this one for a while, and I'm sure there's a solution, but I'm just not seeing it. I've got a collection of tables, among which are document, and attrib_xref. In the attrib_xref table, there's (among others) the following columns: DocID AttribID AttribValue Each document can have multiple attributes, so there may be many lines in this table, with the same DocID, but different AttribID/AttribValue pairs. What I'd like to be able to do is an "and" search for multiple attributes, so I'd like to be able to say that I'm looking for the document with DocID=x, where AttribID=12 and it's corresponding value is 'some text', AND where there's also a second Attrib_XRef record with DocID=x, where AttribID=24 and it's corresponding value is 'some other text' I also need this to be extensible - ie, a person may specify one attribute pair, or 2, or 3, or... etc. Any suggestions (short of re-designing the DB - that's out of my control, unfortunately). If someone can point me in the right direction, I'd really appreciate it... Thanks, Dirk __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Multiple CFApplication under 1 application.cfm
Make sure you change the maximum session timeout in the CF administrator. It defaults to 20 minutes and if you haven't changed that it won't matter what you put in the cfapplication tag. -Original Message- From: Perez, Percy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:14 AM To: CF-Talk Subject: Multiple CFApplication under 1 application.cfm Hello, Is the following possible under CF 4.5? I would like to setup a timeout of 8 hours for my internal network machines and 1 hour for people for external users? Even though, I get no errors, it seems to time out very quickly ( 15 minutes...) Thanks for the help. Percy __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFQUERY Question to populate a drop down for search
If you want the results sorted on the DISTINCT column(s) there's no need to include an order by. The SQL engine must sort the results on those fields to determine uniqueness. It's probably a good practice to include an order by anyway, just for clarity. -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 5:57 AM To: CF-Talk Subject: RE: CFQUERY Question to populate a drop down for search > You could use: > > SELECT DISTINCT city FROM profiles Not forgetting to ORDER BY the query, otherwise it can appear pseudo-random Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Array questions
I would think it would work. However you lose the association with the second dimension. i.e. if you were sorting it by the first dimension and then wanted display data from the second you'd be out of luck. -Original Message- From: Timothy Heald [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 3:26 PM To: CF-Talk Subject: RE: Array questions So will arrayAvg(myArray[1]) work? NM I am going to play some with it tonight. Tim Heald ACP/CCFD :) Application Development www.schoollink.net > -Original Message- > From: Dave Watts [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 24, 2002 3:27 PM > To: CF-Talk > Subject: RE: Array questions > > > > Man we have all these great array functions, and they only > > work on single dimension arrays. > > Well, this is to be expected, in that it doesn't make any sense to perform > these sort of operations on a multidimensional array. What would it mean, > after all, to sort a two-dimensional array? How would you sort the outer > dimension? It's worth pointing out that a two-dimensional array is nothing > more than an array in which each element is itself an array - that is, > there's no such thing as a multidimensional array, really! > > However, there's nothing to stop you from using an array function on any > array, even if that array is an element within another array. This is what > people mean typically, when they talk about using array functions on > multidimensional arrays. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > voice: (202) 797-5496 > fax: (202) 797-5444 > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Array questions
No need to reinvent the wheel. How about Don't think it will work on a 2D array but I don't see how your data fits a two dimension array. -Original Message- From: Timothy Heald [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 2:29 PM To: CF-Talk Subject: RE: Array questions Looks like a neat problem. Lets see: total = 0; for(i = 1; i lt arrayLen(avgMark); i = i + 1){ total = total + avgMark[i]; } average = total / arrayLen(avgMark); That should do it right? Tim Heald ACP/CCFD :) Application Development www.schoollink.net > -Original Message- > From: Thane Sherrington [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 24, 2002 2:15 PM > To: CF-Talk > Subject: Array questions > > > If I define a 2 dimensional array with info in it like this: > > Element NameLowMark HighMarkAvgMark > 1 Fred22 88 45 > 2 Bob 55 96 83 > > Is there a way to easily get the average of the average column > (getting the > lowest mark and highest should be easy with ArrayMin and ArrayMax), or > would be better off with four single dimension arrays? > > T > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: ahhh query
You could create a special noiseword dictionary which would have all the "generic" search words you don't want to return. In you example I guess it would look something like this... "University,of,The" Then I'd create a view which consisted of Id, sort_title where id was a fk back to the schools table and sort_title is just the original title with any noisewords replaced by ''. The idea needs a little fleshing out but you get the drift. -Original Message- From: Ewok [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 5:05 PM To: CF-Talk Subject: ahhh query bla... I have a template topped by the alphabet, all letters are links and they need to display the correct info from the database on the page when clicked, However the info that is being sorted will be names such as. University of Alabama (A) Florida State University (F) The BlahBlah Institute(B) The University of Chicago (C) so basically the word I need to check the first letter of could be ANYHWERE in the name ANY and ALL ideas are appreciated...(short of finding a new line of work) : ) __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: search problem
You probably want to have % signs around your LIKE data. Otherwise it more or less functions as an = -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 2:09 PM To: CF-Talk Subject: search problem Hello, I have a simple search code below that is searching an Access table, but it does not find the fields. Is there something I am missing? Robert O. SELECT * FROM purchases where 0 = 0 And invoicenumber LIKE '#FORM.invoicenumber#' And contact LIKE '#FORM.contact#' And vendor LIKE '#FORM.vendor#' ORDER BY ID DESC Displayed at bottom: Queries Getpo (Records=0, Time=16ms) SQL = SELECT * FROM purchases where 0 = 0 And invoicenumber LIKE '2' And contact LIKE '' And vendor LIKE '' __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: hiermenus
Don't think so. I can't speak specifically toward the Hiermenu, but I had a similar situation last year (needing a popup menu to cross a frame border). I looked at all kinds of dhtml and flash options with no luck. The closest I found was a dhtml menu which was displayed in one frame but popped open in another frame. It worked okay but the dhtml was extremely heavy and complex and we ended up ditching the idea. When you think about it, it makes sense that this wouldn't be possible. Think of a frame as sort of a self contained browser instance. You're asking a browser to draw outside of it's own window, which really shouldn't happen. -Original Message- From: phumes1 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 2:20 PM To: CF-Talk Subject: hiermenus Hi, I'm using the hiermenus in my application. I have two frames and my top navigation has the dropdown menus. The top frame is only 60 pixels in height but when I move the cursor over the link the popup menu stays within that frame. Is there a way with v4.1.1. to have the dropdown menu "overlay" the frames? http://www.webreference.com/dhtml/hiermenus/ +--- + Philip Humeniuk [EMAIL PROTECTED] [EMAIL PROTECTED] +--- -+ __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: sharing sessions due to url.cfid and url.token
Opps, you're right. I forgot to add before the meta refresh. I was under the impression that you had already added addtoken="no" attributes to your cflocations. Otherwise you are correct, this might kill some valid sessions. However, if I were you, I'd really focus my efforts on cleaning up all the cflocation calls (I know what a pain it is, I've had to do it also. Thank goodness for Extended Replace!). But, it's an easy (if mindnumbing) fix which is pretty hard to screw up as opposed to messing around with the login logic (which has a higher potential for disaster I would think). Just my $.02 -Original Message- From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 2:18 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token Yes, but by the time your Application.cfm runs this, the cfid and cftoken are already assumed as the session info. They're also already written to cookie.cfid and cookie.cftoken. I could also force a new session everytime I get url.cfid/url.cftoken, but to do that I would have to make sure all the modified files (with cflocation addtoken="no") made their way from development (through QA) to production. That's not a small number of files and that's not an easy task. -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:32 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token claudia, I played around with this code in my Application.cfm file. It seems to work ok. The idea is to check for and invalidate any session information passed along on the url line. You can probably spruce it up by actually removing the CFID and CFTOKEN arguments with an REReplace or something, but I'm lousy at regular expressions so I just hacked this up quick. Also, you'll likely want to loop over the NewQs query string and Url Encode the right hand side of each expression. -Original Message- From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:01 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token You can have multiple users showing the same IP address if they're behind the same firewall. I've already added addtoken="No" to the cflocations, but I just wanted to know if there was a way of checking. I thought about the cgi.http_referrer and clearing the session structure and expiring the cookies if the referrer is not the expected, but sometimes the http_referrer is blank and that doesn't mean the user is pasting a url on the browser. Considering that all access is done after user login, I guess I can create my own cookie when the user logs in, containing cfid and cftoken, and always check that against the current cfid and cftoken. If that's not the same, there wasn't a login in the current machine or session is expired - force new login. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 12:43 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token If you pass a URL with a CFID and token in it to a different user, the new user will "hi-jack" that session information. We are currently experiencing the same issue as Claudia. Our current solution is to put "addtoken = no" (or something of that nature) from the cflocation tags. The other thought is to check to ensure IP's match via the suggestion Jeffry gave, but he raised an interesting point, the IP's may not always match behind a firewall. Why would the IP's not always match? Anyone want to give a firewalls 101 crash paragraph? Thanks, CC Jeffry Houser @farcryfly.cocc: m> Subject: RE: sharing sessions due to url.cfid and url.token 05/21/02 10:02 AM Please respond to cf-talk If the session wasn't being passed in the URL, then there would be no problem with someone stealing a session through URL sharing. I would look into using CGI Variables. Check if the CGI variable (I forget which one, HTTP_Referrer maybe?) to see where the user came from. Granted if someone fakes it, this will not prevent anything. At 10:44 AM 5/21/2002 -0400, you wrote: >About the only thing I can think of is to add some code to your App.cfm file >which checks for the existence of CFID and CFTOKEN as URL variables and if >found, just redirect to the same page minus the session info on the url >line. Of course this assumes you don't ever pass the session info in the >url. > > > >-Original Message- >From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]]
RE: Most efficient way to check if two lists
Most efficient probably depends on how the list is organized, but check out cflib and the ListInCommon or ListUnion udfs. You could probably modify one of them to just return true as soon as a match was found instead of building the entire union. -Original Message- From: Won Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:57 PM To: CF-Talk Subject: Most efficient way to check if two lists Hello, Need to find out which way is the most efficient way to see if a value in list A is a value in list B. List A = 1,2,3 VALID ListMatch List B = 2,3,4 List A = 1,2,3 VALID ListMatch List B = 1,4,6 List A = 1,2,3 NOT VALID ListMatch List B = 7,4,6 As long as it has single matching values it is valid. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: sharing sessions due to url.cfid and url.token
claudia, I played around with this code in my Application.cfm file. It seems to work ok. The idea is to check for and invalidate any session information passed along on the url line. You can probably spruce it up by actually removing the CFID and CFTOKEN arguments with an REReplace or something, but I'm lousy at regular expressions so I just hacked this up quick. Also, you'll likely want to loop over the NewQs query string and Url Encode the right hand side of each expression. -Original Message- From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:01 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token You can have multiple users showing the same IP address if they're behind the same firewall. I've already added addtoken="No" to the cflocations, but I just wanted to know if there was a way of checking. I thought about the cgi.http_referrer and clearing the session structure and expiring the cookies if the referrer is not the expected, but sometimes the http_referrer is blank and that doesn't mean the user is pasting a url on the browser. Considering that all access is done after user login, I guess I can create my own cookie when the user logs in, containing cfid and cftoken, and always check that against the current cfid and cftoken. If that's not the same, there wasn't a login in the current machine or session is expired - force new login. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 12:43 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token If you pass a URL with a CFID and token in it to a different user, the new user will "hi-jack" that session information. We are currently experiencing the same issue as Claudia. Our current solution is to put "addtoken = no" (or something of that nature) from the cflocation tags. The other thought is to check to ensure IP's match via the suggestion Jeffry gave, but he raised an interesting point, the IP's may not always match behind a firewall. Why would the IP's not always match? Anyone want to give a firewalls 101 crash paragraph? Thanks, CC Jeffry Houser @farcryfly.cocc: m> Subject: RE: sharing sessions due to url.cfid and url.token 05/21/02 10:02 AM Please respond to cf-talk If the session wasn't being passed in the URL, then there would be no problem with someone stealing a session through URL sharing. I would look into using CGI Variables. Check if the CGI variable (I forget which one, HTTP_Referrer maybe?) to see where the user came from. Granted if someone fakes it, this will not prevent anything. At 10:44 AM 5/21/2002 -0400, you wrote: >About the only thing I can think of is to add some code to your App.cfm file >which checks for the existence of CFID and CFTOKEN as URL variables and if >found, just redirect to the same page minus the session info on the url >line. Of course this assumes you don't ever pass the session info in the >url. > > > >-Original Message- >From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, May 21, 2002 10:19 AM >To: CF-Talk >Subject: sharing sessions due to url.cfid and url.token > > >I'm trying to think of a way not to allow people to inadvertedly share a >session by sending each other a url with their cfid and cftoken in it. Of >course we can just make sure that those are not passed as url parameters, >but I'm thinking if there's a way to check if this is a session initiated by >someone else. >Do you guys have any ideas? > >Thanks > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: sharing sessions due to url.cfid and url.token
Usually machines behind a firewall will have non-routable IP address (ex. any ip address starting with 192.168.*.*) When any user on our trusted network access a resource on the external network (such as an external website), their IP address is masqueraded by the external WAN interface. So the end result is that _all_ of the users coming from our trusted/internal network appear to have the same IP address. The same problem arises when the uses have a proxy server between them and the intranet. In general the IP address is an unreliable way to uniquely identify users. -Original Message- From: Casey C Cook [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 12:43 PM To: CF-Talk Subject: RE: sharing sessions due to url.cfid and url.token If you pass a URL with a CFID and token in it to a different user, the new user will "hi-jack" that session information. We are currently experiencing the same issue as Claudia. Our current solution is to put "addtoken = no" (or something of that nature) from the cflocation tags. The other thought is to check to ensure IP's match via the suggestion Jeffry gave, but he raised an interesting point, the IP's may not always match behind a firewall. Why would the IP's not always match? Anyone want to give a firewalls 101 crash paragraph? Thanks, CC Jeffry Houser @farcryfly.cocc: m> Subject: RE: sharing sessions due to url.cfid and url.token 05/21/02 10:02 AM Please respond to cf-talk If the session wasn't being passed in the URL, then there would be no problem with someone stealing a session through URL sharing. I would look into using CGI Variables. Check if the CGI variable (I forget which one, HTTP_Referrer maybe?) to see where the user came from. Granted if someone fakes it, this will not prevent anything. At 10:44 AM 5/21/2002 -0400, you wrote: >About the only thing I can think of is to add some code to your App.cfm file >which checks for the existence of CFID and CFTOKEN as URL variables and if >found, just redirect to the same page minus the session info on the url >line. Of course this assumes you don't ever pass the session info in the >url. > > > >-Original Message- >From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, May 21, 2002 10:19 AM >To: CF-Talk >Subject: sharing sessions due to url.cfid and url.token > > >I'm trying to think of a way not to allow people to inadvertedly share a >session by sending each other a url with their cfid and cftoken in it. Of >course we can just make sure that those are not passed as url parameters, >but I'm thinking if there's a way to check if this is a session initiated by >someone else. >Do you guys have any ideas? > >Thanks > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query help
Thanks, Ben I was not aware of that. Unfortunately, it does seem new to SQL Server 2000, at least I don't see anything about it in books online fot MSSQL7. Good tip though. -Original Message- From: Ben Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 11:21 AM To: CF-Talk Subject: RE: Query help If you're using SQL Server, it's not always good practice to use @@IDENTITY. Instead, use SCOPE_IDENTITY(). SCOPE_IDENTITY() is the same as @@IDENTITY, except it limits the scope. For example, if you insert a row into TableA, but that table has an insert trigger that does some processing and inserts into another table called TableB, you'll pull the ID for TableB. SCOPE_IDENTITY() always pulls the most recent identity within scope for the current session, which means you don't need to worry about triggers. Granted, not a lot of people use triggers, but it's still good practice. Also, SCOPE_IDENTITY() may have been recently added. It may be a SQL Server 2000 feature so if you're using anything prior, you may be out of luck. Anybody else know if this is new to SQL Server 2000? Ben Johnson Hostworks, Inc. __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query help
Certainly you can do that (or even more reliably you could get a UUID value and insert that and then select it back out to get your PK). However, then you end up cluttering up your database with a bunch of information whose life span is essentially over once the insert is complete. Personally I don't like that. Getting the max(id) value where the inserted data fields match what you just inserted will work just as well without the overhead. Especially if you wrap the whole operation in a cftransaction block. Obviously a personal choice on which way to go. Both will work. I doubt whoever started this thread is paying attention to my ramblings at this point anyway. -Original Message- From: Won Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 11:50 AM To: CF-Talk Subject: RE: Query help I agree with you, 99% of the time it will be Access or SQL Server. I just gave another possible answer because I wanted to shed another view. Access also has a date/time field which one can create a CF variable and then insert that in and then check against the cf variable. Works well. At 11:41 AM 5/21/2002 -0400, you wrote: >I suppose the answers were MS centric but in my experience on this list if >someone doesn't explicitly state which database they are using in a post, >99% of the time it will be Access or SQL Server so I suspect that's why the >anwers were geared that direction. As I mentioned in an earlier response, if >someone is using Oracle it is more likely then already know how do this >since it requires a bit more knowledge "up front". > >Your 100% solution really is no more reliable/portable than several of the >suggestions which have been previously posted. From his mention of using an >autonumber field it sounds like he's using MS Access, in which case I don't >believe there even exists a datetimestamp column type. > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query help
I suppose the answers were MS centric but in my experience on this list if someone doesn't explicitly state which database they are using in a post, 99% of the time it will be Access or SQL Server so I suspect that's why the anwers were geared that direction. As I mentioned in an earlier response, if someone is using Oracle it is more likely then already know how do this since it requires a bit more knowledge "up front". Your 100% solution really is no more reliable/portable than several of the suggestions which have been previously posted. From his mention of using an autonumber field it sounds like he's using MS Access, in which case I don't believe there even exists a datetimestamp column type. -Original Message- From: Won Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 11:23 AM To: CF-Talk Subject: RE: Query help Almost all the answers are MS SQL-centric. Not sure what type of development house you work in, but MS-SQL centric answers are not a valid solution for some of us. Both Oracle and MS SQL have several methods to retrieve the last primary key in a particular table. I won't bore you with my opinion which I think is a better and more elegant solution as both are effective. If you want to be able to 100% retrieve the last record you inserted into any DB system simply use a dateTime Stamp. Do a select against the inserted fields and the datetimestamp. If you need sample code, email me off the list and I will cut and paste something for you. Won Lee __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: sharing sessions due to url.cfid and url.token
About the only thing I can think of is to add some code to your App.cfm file which checks for the existence of CFID and CFTOKEN as URL variables and if found, just redirect to the same page minus the session info on the url line. Of course this assumes you don't ever pass the session info in the url. -Original Message- From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 10:19 AM To: CF-Talk Subject: sharing sessions due to url.cfid and url.token I'm trying to think of a way not to allow people to inadvertedly share a session by sending each other a url with their cfid and cftoken in it. Of course we can just make sure that those are not passed as url parameters, but I'm thinking if there's a way to check if this is a session initiated by someone else. Do you guys have any ideas? Thanks __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query help
It depends on the db vendor and the primary key type (if it's anything other than an int it is a little more tricky). In SQL Server you can use the @@Identity immediately after the insert. It will return the last primary key (as long is it is an identity) which was inserted. There are some things to be careful of when using @@Identity, but it is fairly straightforward. Check Books Online for more detail. In Access, AFAIK there is not an equivalent operator. What I usually do is select max(pk_id) from table where data = 'whatever I just inserted' That approach obviously has some pitfalls as well, but in practice it works pretty well. In Oracle, most likely you'd be using sequences, and can get the value out of the sequence before the insert. But in that case you probably wouldn't be asking the question ;) -Original Message- From: Kris Pilles [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 9:06 AM To: CF-Talk Subject: Query help How can Insert a record into a table (that I know how to do) but after the insert, I want to be able to know what the primary key for the record I just inserted... __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query Issue
Any chance you can change that db schema, or is it too late? I would think it might be a big headaches to maintain such a scheme. It's also likely to be much slower than some other approaches. If you're stuck with the current setup, just try something like this: select blah from Functions where 4 IN (select UserIDList from Functions where FunctionId = 1) -Original Message- From: Tony Gruen [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 6:43 PM To: CF-Talk Subject: Query Issue Howdy List! Can someone please 'gimmie a thread' on this? (ie: Brain thread, as in cpu thread) I have an existing database with a field named 'AccessList'. This field is a comma delimited list of IDs (numeric only). These IDs are for users who are to be granted access to a function. For example one entry would be 4,15,26,44,101,9. I am trying to devise a query that will check the field for a single userID. Say 4 for example... note that 44 also exists in the list. My fumbling attempts to devise a way using LIKE and IN are not working. __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Macromedia Forums (aka FuseTalk)
-Original Message- From: Rick Walters [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 3:12 PM To: CF-Talk Subject: Macromedia Forums (aka FuseTalk) Dear MM, Your forums blow. -- Try setting them to "suck" ;) __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL Server 2K indexing
Jim, Short answer no with an if. Long answer yes with a but. just kidding ;) You can certainly create and index which contains multiple columns. Whether or not you want to do this is another topic completely. There are alot of questions which you need to answer to properly index a table. What kinds of queries will be run against the table? What fields will be most often searched or joined on? How many updates/inserts are anticipated? All of these things should be taken into account because they can have a large impact on index tuning. For example if you said that most of the searches would be done on names you might want to create a clustered index on (last_name, first_name). Also your table seems to be missing a primary key? Is it (office_id, position_id)? I would add a primary key (which will automatically create an index on those fields, you probably want it unclustered but again it's difficult to say without knowing your data patterns). Another option is to let the SQL Server (assuming you're using sql server, other db vendors likely have similar tools) Index Tuning Wizard do the work. This will allow SQL Server to watch your table in action so to speak and suggest index improvements. This is a good solution if you are unsure about the types of queries that will be run against your table. -Original Message- From: Jim Curran [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 6:44 PM To: CF-Talk Subject: OT: SQL Server 2K indexing Hello all, I'm setting up indexes for a new table on the following fields... first_name last_name office_ID (FK) position_ID (fk) Should I create a new index for each field? Or can i create one index with all fields listed in the column area? TIA, - j __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: deadlocks in CFGLOBAL
In addition to what Jon suggested you may want to consider implementing the UUIDToken solution described here: http://www.macromedia.com/v1/Handlers/index.cfm?ID=22427&Method=Full It helped our site when we were seeing Session/Client variables being improperly "shared" by different users as you describe. Note that it requires some changes to the CFID field in order to hold the longer token. I have made those columns VARCHAR(70) and it seems to be long enough. -Original Message- From: Hoag, Claudia (LNG) [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 12:42 PM To: CF-Talk Subject: RE: deadlocks in CFGLOBAL Thanks, I didn't realize that's all it was storing in CGLOBAL :) -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 12:38 PM To: CF-Talk Subject: Re: deadlocks in CFGLOBAL Client variables use a cookie to look up the client value from the database, so it is possible and I imagine cfglobal table gets a lot of Update or Select/Insert (I'm not sure how CF handles updating that table) queries under load. You might want to go into the CF admin and just disable global client variable updates, in the client variable section if you dont use the stats CF keeps about last visit's and hitcounts. Disabling the global stats is SOP here. You will probably notice an overall performance boost as well... jon - Original Message - From: "Hoag, Claudia (LNG)" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 12:02 PM Subject: deadlocks in CFGLOBAL > Does anyone know why I get row level deadlocks in CFGLOBAL and what are the > implications of that? > The other day I talked to our DBA about some deadlocks (not related to > CFGLOBAL) and she started to look for them... And found a whole bunch of > deadlocks in the CFGLOBAL table. Those are row level locks and if she didn't > start looking for them, I would never take notice that those were happening. > I wonder if that has anything to do with users complaining that their client > variables are getting mixed with other users' client variables. I can't see > how that would happen, considering that the client variables rely on a > cookie set for an individual browser... Any ideas? > > TIA, > Claudia > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDFs in a Custom Tag problem
What about this function IsOperator( value ) { blah blah blah; return something; } -Original Message- From: heirophant mm [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 10:28 AM To: CF-Talk Subject: UDFs in a Custom Tag problem Hello developers, I'm writing a custom tag, and I've written some UDFs to clean up some of the code within the custom tag. Only the custom tag uses these UDFs - they're pretty specialized - so I thought it would be easiest to just put them right inside the template for the custom tag. Here's my general structure: function IsOperator( value ) { blah blah blah; return something; } more code some output, etc. I get this error: "Routines cannot be declared more than once. The routine IsOperator has been declared twice in different templates." I have found that this error occurs at the very beginning of the "end ExecutionMode" of the tag. I can't figure out how to stop this error. Any ideas? Thanks Mike Mertsock Alfred University Webteam Outgrown your current e-mail service? Get a 25MB Inbox, POP3 Access, No Ads and No Taglines with LYCOS MAIL PLUS. http://login.mail.lycos.com/brandPage.shtml?pageId=plus FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: A Tip (maybe new, maybe not)
you are correct, MM/Allaire best practices for Access DBs says not to use connection pooling. see http://www.macromedia.com/v1/Handlers/index.cfm?ID=1540&Method=Full -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 2:26 AM To: CF-Talk Subject: Re: A Tip (maybe new, maybe not) Using SQL Server maintaining the connection would be advantageous because their wouldn't be the overhead for making a new connection, logging in, etc. In Access I don't think it matters. It is only Access after all. If I get concerned about performance of a site based on Access, I upgrade the site to SQL Server if CF's query caching wont do the trick. I believe it's actually reccomended that connections to Access databases are not maintained for memory reasons. jon Mike Kear wrote: > What's the advantage of locking the server on to the database at all? Is it > performance? > > Cheers, > Mike Kear > Windsor, NSW, Australia > AFP WebWorks > > > -Original Message- > From: Jon Hall [mailto:[EMAIL PROTECTED]] > Subject: Re: A Tip (maybe new, maybe not) > > Go into the CF Admin and uncheck maintain database connections and your > database wont lock at all unless it's actively being accessed by CF. > > jon > Paul Giesenhagen wrote: > >>I don't know if any of you work with Access much as a database here and > > there, but I have been developing using an access database and had to upload > it to our servers after "looking" at the data or correcting the data as I > was writing scripts ..well as you all know it locks so you cannot FTP over > it once it has been accessed. > >>I would stop/start the cf service to get this to run, well it became a > > pain when my terminal window would timeout and I would have to logg back > into my server yadda yadda. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF4.0 shared scope locking?
Bud, You are correct that two different users will be able to access the lock simultaneously in my #CFID_#CFTOKEN# example, but that's okay because I was locking a Session variable. Each user has their own Session memory and we don't need to worry about user A writing in user B's memory space. You are correct when talking about Application or Server variables. In those cases you definetely do not want to use CFID or CFTOKEN. You just need to use an appropriate lock name for each shared scope. The server scope needs to be specific to the entire server, Application scope for the specific application you are running, and the Session scope specific to each user. At least that's always been my understanding of cf locking. In your example below I believe you are actually locking at too high a level. You will have user A waiting on locks held by user B even though their sessions should be completely independant of one another. -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 10:48 AM To: CF-Talk Subject: RE: CF4.0 shared scope locking? On 5/15/02, Rob Baxter penned: >You need to use the name attribute to specify a name unique to that locking >code. For example, for Session var locking I usually used name="#CFID#_#CFTOKEN#" ...> I don't think that's going to work as user A will have a different cfid and cftoken than user B. This will allow them to both access the same exclusive lock simultaneously since they'll be named differently. I generally use the datasource name since I know it's unique to the server and append something for each different variable. To set a value in a variable named session.cart: To read session.cart: #session.cart.product_id# -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: using cflock with scope vs name
In short, name locking provides more flexibility and granularity but also requires better planning on lock usage. My personal best practice is to always use scope locking for memory variables. However that doesn't mean there is no place for name based locks. For example, when I modify a file using cffile, I try to wrap the tag in a lock like this... Then I use a readonly lock whenever I read from the file. -Original Message- From: David Schmidt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 10:42 AM To: CF-Talk Subject: using cflock with scope vs name Is there a benefit to use the name= attribute rather than the scope= attribute in a cflock statement. What is recommended? Thanks, Dave __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF4.0 shared scope locking?
Slight correction: You wouldn't want to use name="Application_scope" because that would lock app variables across all applications on the server (assuming they used the same naming convention), probably not what you want. A better approach, as Dave Watts suggested, is to use the application name. -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 10:09 AM To: CF-Talk Subject: RE: CF4.0 shared scope locking? You need to use the name attribute to specify a name unique to that locking code. For example, for Session var locking I usually used The trick is to be consistent with your lock naming so that different code block which you want to lock will have the same name. For Application vars you need a different name since you want application wide locking and not session wide locking. Something like name="Application_Scope" might work. Again, the trick is to be consitant. -Original Message- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:55 AM To: CF-Talk Subject: CF4.0 shared scope locking? Another CF4.0-only question... Jeez, I feel like I'm back in the stone age doing this with MX flying around! What's the deal with locking shared scope variabled in CF4.0, which doesn't support the SCOPE attribute for CFLOCK? Instead of: temp = application.variable; Should I use: temp = application.variable; Does this do the same job? I suspect not, as the SCOPE attribute wouldn't be necessary if this was the case... If anyone's got any knowledge of what to do here, please let me know! TIA, - Gyrus - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF4.0 shared scope locking?
You need to use the name attribute to specify a name unique to that locking code. For example, for Session var locking I usually used The trick is to be consistent with your lock naming so that different code block which you want to lock will have the same name. For Application vars you need a different name since you want application wide locking and not session wide locking. Something like name="Application_Scope" might work. Again, the trick is to be consitant. -Original Message- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:55 AM To: CF-Talk Subject: CF4.0 shared scope locking? Another CF4.0-only question... Jeez, I feel like I'm back in the stone age doing this with MX flying around! What's the deal with locking shared scope variabled in CF4.0, which doesn't support the SCOPE attribute for CFLOCK? Instead of: temp = application.variable; Should I use: temp = application.variable; Does this do the same job? I suspect not, as the SCOPE attribute wouldn't be necessary if this was the case... If anyone's got any knowledge of what to do here, please let me know! TIA, - Gyrus - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: restarting a service
If you're looking to schedule it I wouldn't even bring CF into the equation. Just create a batch file with "net stop" and a "net start" command for your service, and then use the NT scheduler to have it run at your desired times. Unless you need to be able to execute this via the web, there's no need to use CF at all. -Original Message- From: Mario Martinez [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 10:13 AM To: CF-Talk Subject: restarting a service Hi friends: This is my problem: I need to restart a service periodically. I'm aware I can easily schedule tasks in Coldfusion but ,is there any way to restart a service?? , I mean any tag, function , etc . I got coldfusion installed in a windows 2000 server. Thanks in advance for any help. regards Mario __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: udf help
Deanna, I've made a few alterations to the highlight UDF which should work. It basically uses recursion to call itself on each word of a comma delimitted list (you should probably change this to make the delimiter an optional parameter, I was just lazy). I've done a few basic tests and it seems to work, but no garauntees. One thing you need to watch out for when highlighting multiple keywords is that if you have any keyword which is a substring of another keyword, you may not get the correct results. There are workarouds for this, but it's probably a pretty unlikely occurance depending on what you are using the highlight function for. If it becomes a problem, I can tell you how I've dealt with it in the past. Here's the modified UDF function highLight(str, wordList) { var front = ""; var back = ""; var matchCase = false; //check for empty word list, this is the base condition for the recursion if(ListLen(wordList) Lt 1) return str; else word = ListFirst(wordList); if(ArrayLen(arguments) GTE 3) front = arguments[3]; if(ArrayLen(arguments) GTE 4) back = arguments[4]; if(ArrayLen(arguments) GTE 5) matchCase = arguments[5]; if(Not matchCase) CurTxt = REReplaceNoCase(str,"(#word#)","#front#\1#back#","ALL"); else CurTxt = REReplace(str,"(#word#)","#front#\1#back#","ALL"); return Highlight(CurTxt, ListRest(wordList), front, back, matchCase); } Let me know if it works for you on a more personal note; I don't know if you remember me but I used to work for UWEX in Wisplan. Say hi to Eric and Greg for me if they're still kicking around there. -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 2:18 PM To: CF-Talk Subject: udf help Hi Folks, I'm trying to modify Raymond Camden's highlight udf to allow for multiple terms, and I'm not having a lot of luck. But, I've never written a udf, so Here's where I'm at so far, basically, my thinking is that I have to loop over the regular expression for each term passed in, yes? But, it's not working - doesn't throw an error, but doesn't highlight anything either. (Yes, I realize that only the Not matchase part would loop right now...one piece at a time.) function highLight(str,word) { var front = ""; var i = 0; var back = ""; var matchCase = false; if(ArrayLen(arguments) GTE 3) front = arguments[3]; if(ArrayLen(arguments) GTE 4) back = arguments[4]; if(ArrayLen(arguments) GTE 5) matchCase = arguments[5]; if(NOT matchCase) for(i=1; i lt listlen(word, " "); i = i + 1) return REReplaceNoCase(str,"#listgetat(word,i)#","#front#\1#back#","ALL"); else return REReplace(str,"(#word#)","#front#\1#back#","ALL"); } Deanna Schneider Interactive Media Developer [EMAIL PROTECTED] __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL Question
The older Transact SQL syntax (*=) is pretty widely supported, but as Adam suggested for portability (and IMO readability) it is better to use the ANSI SQL syntax (LEFT OUTER JOIN). In addition, both Microsoft and Sybase reccommend using ANSI style joins. http://www.microsoft.com/sql/using/tips/development/July23.asp -Original Message- From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 09, 2002 2:35 PM To: CF-Talk Subject: Re: SQL Question Adam, Is the *= universal syntax (MS SQL, Access, Oracle, MySQL ect..?) Thanks that is working beautifully! Paul Giesenhagen QuillDesign http://www.quilldesign.com SiteDirector Commerce Builder > SELECT h.id, h.header, l.link, l.link_title > FROM headers h, links l > WHERE h.id *= l.headerid > > //notice the star on the left side of the = in the condition > > > Adam. > > > > -Original Message- > > From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 09, 2002 1:04 PM > > To: CF-Talk > > Subject: OT:SQL Question > > > > > > I have two tables I am trying to join, one is a header and > > one is the links > > under that header. > > > > header table: > > id, header > > > > links table > > id, headerid, link, link_title > > > > I am writing a join query to pull up all the headers and the > > links that go > > with a particular header, but I if there are no links > > associated with the > > header, it won't display anything. I want it to show the > > headers with 0 > > links or with 100 links associated. > > > > > > Query is: > > > > > > select h.id, h.header, l.link, l.link_title > > from headers h, links l > > where f.sub_object = l.headerid > > and f.sub_object = h.id > > group by h.header, f.state, f.sort, l.link, l.link_title, h.id > > > > > > Any help would be appreciated. > > > > Paul Giesenhagen > > QuillDesign > > http://www.quilldesign.com > > SiteDirector Commerce Builder > > > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SELECT TOP n vs MaxRows...
It would seem that TOP is more efficient because you're dropping the extra rows on the sql side instead of the cf side, thereby saving yourself some resources on the recordset transfer. -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 6:32 PM To: CF-Talk Subject: SELECT TOP n vs MaxRows... A quickie: Is there any benefit to using SELECT TOP n vs using the MaxRows attribute in cfquery? Tyler Silcox email | [EMAIL PROTECTED] __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Name that tag -- Highlighting words on a page
The tag is called CF_Highlight. There's also a CFX tag CFX_Highlight, which is faster than the custom tag. But I'd stick with the UDF unless performance becomes an issue. -Original Message- From: Robyn Follen [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 6:14 PM To: CF-Talk Subject: RE: Name that tag -- Highlighting words on a page Worked like a charm. Thanks! -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 5:43 PM To: CF-Talk Subject: RE: Name that tag -- Highlighting words on a page Not sure of the tag, but there is a UDF that will do this at cflib.org. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Robyn Follen [mailto:[EMAIL PROTECTED]] > Sent: 02 May 2002 17:42 > To: CF-Talk > Subject: Name that tag -- Highlighting words on a page > > > Hi folks, > > I know I came across a tag in CF once that, given a word as a > parameter, > would highlight all instances of that word on a template > displayed for the > user. I'm trying to do just that for a search I'm > implementing. Can anyone > name that tag? I'm pulling my hair out trying to remember > where I saw it. > > Robyn > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
CF/SQL service setup
I'm curious to know how any CF admins out there have setup a multi-server configuration. I've recently been tasked to look at/improve our security setup here at work. Currently we have a web/cf server (IIS 5.0 and CF 5.0) running on W2K server. On another server we have NT4 with SQL Server 7.0 All of our queries are written to use ODBC and trusted connections. To get this to work, we have altered the Cold Fusion Application Service setup so that it runs as a local user with Administrative privileges. That same user was then added as an (NT) administrator on the SQL box so that essentially CF is authenticating as dbo. That isn't a huge problem for us as we are small and all the developers who have access to the sql server are admins. Another conderation is that CF needs the ability to write files to a file server (which also has this same "cold fusion" user replicated on it). Obviously this setup is less than secure and I'd like to improve it however possible. What I'm looking for are some "best practices" or advice from anyone out there with similar configurations. I'm looking at creating a domain for these machines so at the very least the passwords can be easily changed more often. Any other suggestions or direction is welcome. __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: dynamic cfset
Put quotes around the variable name, i.e. That should do the trick. 'though you may want to consider using a structure instead ... StructInsert(Keith, dynamicpart, "No") Then you could acess it as Keith.blue, Keith.red, Keith.green, etc. -Original Message- From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 4:58 PM To: CF-Talk Subject: dynamic cfset I am working on a site where I need to use a cfset inside a cfloop. The tricky part is that I want my variable name to be dynamic. I have been trying the following... .but as some of you might guess it's not working. The idea would be to get the result of Keithblue = "No" Keithred = "No" Keithgreen = "No" etc, etc. Can anyone point me in a better direction to get this working? Thanks very much for the help. Talk to you later. Keith __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Nested Locking
Presumably putting locks around the tag call will only lock that particular call. Calls to the same tag in other locations will not be locked. This is only a logical guess, not verified. -Original Message- From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 28, 2002 4:16 PM To: CF-Talk Subject: Nested Locking Hi Quick question regarding locking custom tags. I am working with someone else's code where for some reason they've locked a custom tag. Now I personally would place any neccesary locking in the custom tag. I just wondered if the lock actually does lock the code in the custom tag? Thanks KOla __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: setting empty vars - CFSET or CFPARAM? (was: Reg Expr help)
Perhaps what was meant was that instead of using: you should use: when you're initializing variables which may already exist. I've heard the second version is sligtly faster. Although in practice I haven't really been able to observe much difference either way. Of course in the situation where you want to be sure a variable is null (""), obviously cfset is the only way to go. -Original Message- From: Gyrus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 9:36 AM To: CF-Talk Subject: setting empty vars - CFSET or CFPARAM? (was: Reg Expr help) > I can't remember where I saw it/read it; but it was form a MM guy (or on > a course), that you really shouldn't use variable, you should use Would be nice to know the rationale behind this - anyone? The example I gave was setting a empty string to start a blank list, which would be built up gradually. I can imagine scenarios where maybe the list has already been created, and you want to keep any existing values but create the variable as empty if it doesn't exist. This would be a good use of CFPARAM. But maybe you want to make sure the list starts blank and you *don't* want to keep any old values in there. Surely would be best here? Can't understand why there would be a cover-all rule-of-thumb for using CFPARAM for setting blank vars when the context should really dictate what's used. - Gyrus - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session variable question
Not sure if anyone else has suggested this but try having the two users delete their cookies. They may have the same session ids. -Original Message- From: Ben Densmore [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:58 AM To: CF-Talk Subject: Session variable question I have seen this asked in the cf forums on macromedias site but don't see a clear answer so hopefully someone here can give me a clue. We have an order entry app running internally. I have 2 people that are in our sales dept that keep turning into one another while logged in. An example is, salesman A will be logged in and have administrative rights while salesman B will be logged in on another machine, doesn't have admin rights, but all of a sudden salesman B will have access to all the Admin stuff and be logged in as salesman A. One other weird thing is if salesman A logs out, it kills the session for salesman B. All session variables have been locked when they are created. The only thing I can think that might be happening is that the cfid and cftoken for these 2 guys are the same? we have about 25 people using this system and only these 2 people have this problem. If someone could give me an idea of what's going on I would really appreciate it. Thanks, Ben Densmore __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFDirectory Network Drive - Help!!!!
BTW - When I say CF is running as that same user I mean the Cold Fusion Application Server service. -Original Message- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:52 AM To: CF-Talk Subject: RE: CFDirectory Network Drive - Help Mapped drives are specific to the current user. Unless the user who mapped the drive is currently logged into the server AND CF is running as that same user the mapping will not be available to CF. For these reasons it is not a good idea to depend on mapped drives. To bad CF won't work with UNC paths. -Original Message- From: S V [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:41 AM To: CF-Talk Subject: CFDirectory Network Drive - Help I am using CF 4.5 with IIS 4. Despite successfully making a mapping to a drive on another machine thru "Mapping a drive", the cold fusion server seems unable to see this server when I try to browse in the "Mapping" section of Cold Fusion Administrator. I can see this drive thru Windows explorer or Command prompt, But CF is unable to do so. This means that CFDirectory or CFFile cannot work. Is there anything that I have to do , or install or setup to get this connection to work? Any help or direction is appreiciated! Thanks _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: IsDefined and brackets
I believe that IsDefined is only meant to check for the existance of top level variables, for complex data types you have to use the specific functions for each type. So here CF is trying to find out if there is a variable named "aStruct[aField]" and brackets are illegal in cf variable names. In this case I think you'll have to do a 3 step process: .. -Original Message- From: cf refactoring [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:50 AM To: CF-Talk Subject: IsDefined and brackets The following code throws a syntax error: aStruct[aField] is defined Is this just some CF quirk that IsDefined doesn't like brackets or is there some good reason for this? = I-Lin Kuo Macromedia CF5 Advanced Developer Sun Certified Java 2 Programmer __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFDirectory Network Drive - Help!!!!
Mapped drives are specific to the current user. Unless the user who mapped the drive is currently logged into the server AND CF is running as that same user the mapping will not be available to CF. For these reasons it is not a good idea to depend on mapped drives. To bad CF won't work with UNC paths. -Original Message- From: S V [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:41 AM To: CF-Talk Subject: CFDirectory Network Drive - Help I am using CF 4.5 with IIS 4. Despite successfully making a mapping to a drive on another machine thru "Mapping a drive", the cold fusion server seems unable to see this server when I try to browse in the "Mapping" section of Cold Fusion Administrator. I can see this drive thru Windows explorer or Command prompt, But CF is unable to do so. This means that CFDirectory or CFFile cannot work. Is there anything that I have to do , or install or setup to get this connection to work? Any help or direction is appreiciated! Thanks _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Recursive Query: Anything better??
You didn't say what DB you are using but this should work on SQL Server ... select count(id) as Num, datepart(ww, date) as weekofyear, year(date) as year from main where date > #firstDate# and date < #lastDate# group by datepart(ww, date), year(date) order by year, weekofyear -Original Message- From: Venable, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 5:25 PM To: CF-Talk Subject: Recursive Query: Anything better?? I'm sure there is something better than what I'm doing, basically I want to do a weekly count of how many people have signed up for our newsletter. Here's what I have, it seems VERY inefficient. Any SQL gurus out there wanna help me out? Thanks in advance. SELECT count(id) as num FROM MAIN WHERE date between '#dateformat(DateAdd("d", -7, end))#' AND '#dateformat(end, "mm/dd/yy")#' [formatting clipped for clarity] John Venable __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Query Trouble
Why the 2 queries? How about this? SELECT DISTINCT EventID,EventType,X,Y,EventText FROM Events #qGroups.CurrentRow#, #qSpecificLocations.CurrentRow#, #qSpecificLocations.X#, #qSpecificLocations.Y# It's not exactly clear what you're trying to do but if this isn't quite right you can probably get what you want by adding a group attribute to the cfoutput. -Original Message- From: Bosky, Dave [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 2:29 PM To: CF-Talk Subject: Query Trouble Can someone point out why this query is only getting the last group of records? A second set of eyes would really help! If the query qGroups returns the following eventtypes: ItemA, ItemB, ItemC Only group ItemC and records that are in ItemC will print out. -- SELECT DISTINCT EventType FROM Events SELECT EventID,EventType,X,Y,EventText FROM Events WHERE EventType = '#qGroups.EventType#' #qGroups.CurrentRow#,#qSpecificLocations.CurrentRow#,#qSpecificLocations.X#, #qSpecificLocations.Y#); -- Thanks, Dave __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHTTP
CFHTTP is terrible. It will sometimes just return "Connection Failed". Try refreshing several times. I have often encontered this problem while using CFCACHE. Allaire/MM claim the problem lies in the 3rd party components which do the heavy lifting inside CFHTTP, but that doesn't do us much good. -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:34 PM To: CF-Talk Subject: CFHTTP I can go to http://www.yahoo.com When I try to do a to http://www.yahoo.com I get a Connection Failure message. Any clues? T __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Null Values in MSSQL
you weren't too specific but try something like: select ... where ColA is null -Original Message- From: Graham Pearson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 1:41 PM To: CF-Talk Subject: Null Values in MSSQL Group: This is the first time that I have to test for a NULL Value in MSSQL to retrieve a record set. However, at my present knowledge level, I am unable to retrieve this record set. Anyone have pointers on how I can do this? --- Graham Pearson, System Administrator / Certified Webmaster Northern Indiana Educational Services Center Http://support.niesc.k12.in.us Email: [EMAIL PROTECTED] Voice (574) 254-0444 Ext 108 / (800) 326-5642 Fax: (574) 254-0148 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists