The funny thing is that I don't want to cache those queries anywhere, but since I really don't know the difference between scopes, maybe that's the flaw I have in my own programming skills.
This is how application.cfm is (the db is a SQL 2000 server one): ================================= <cfapplication name="crmapp" sessionmanagement="yes" clientmanagement="yes"> <cfset application.ds="crmdb"> <CFIF #ParameterExists(Cookie.Username)# IS "YES" AND #ParameterExists(Cookie.Password)# IS "YES"> <cfquery name="lookupuser" datasource="#application.ds#"> select * from users where usuario='#cookie.username#' and pass='#cookie.password#' and (idtipo=3 OR idtipo=4) and usuario <> '' </cfquery> <cfif mirauser.recordcount is 0> <!--- delete current cookies and go back to login page ---> <CFCOOKIE NAME="Username" VALUE="" expires="now"> <CFCOOKIE NAME="Password" VALUE="" expires="now"> <cfheader name="location" value="../index.cfm"> <meta http-equiv="refresh" content="0;url=../index.cfm"> <cfelse> ---- run the script here </cfif> ================================== Maybe it's not the best way to handle an application? I suppose it's not, since I'm a self-taught programmer :S Never had any problem before with any other application I developed (and I always used this method), but since this is by far the largest I did, it's when I'm beginning to get these problems.. Thank you again! At 17:41 22/05/2008, you wrote: >Where are you caching these queries? In the session scope? The >application scope? > >It sounds like you a race condition where multiple threads are accessing >the same shared memory space. This would be a coding error, not a flaw >in the language. > >It is important to be familiar with ColdFusion's scopes and who has >access to them. It will be difficult to tell you what is wrong without >seeing your application, but start looking around paying careful >attention to what you place in the application or server scopes as these >are available to all users. Additionally if you stored something >specific to a request in the database, could another request pull out >that same record on accident? > >I don't know if you are using any CFC'c, but CFC's persisted in a shared >scope such as application can very easily allow one users's data to >"bleed" over to another user if you don't carefully manage your >variables. > >Maybe you can give us some specifics on exactly what happens when one of >your users "create[s] a new date in their calendar". > >Hope this gets you started. > >~Brad > >-----Original Message----- >From: KDJ The Net Surfer [mailto:[EMAIL PROTECTED] >Sent: Thursday, May 22, 2008 9:25 AM >To: CF-Talk >Subject: Help! I get someone else's variables! > >Dear guys, thanks in advance for your help! > >My problem is that I've developed this huge application (a kind of >CRM) and it's been working fine for years, but lately it's doing >something odd: sometimes when somebody is going to do something >(like, for example, creating a new date in their calendar), the >application will take the wrong user id (which I suppose it's the >user id of someone else working on the website at the same time). > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306794 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

