RE: Trigger and Sequences
I quick edited the response on my way out of the office last night and just wanted to get the post out there. The actual code does NOT end in a comma, rather it has 12 fields instead of 3. I was attempting to make this easier to read. I am forced to do this from a CF document because I am attempting to have an automatic table creation if a user has not yet created a table for themselves. Thus, the first time they log into the particular system, a table gets created and sequenced and triggered. So apart from attempting to do this in a hurry, can any one suggest feedback? -Original Message- From: Bryan Love [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 6:29 PM To: CF-Talk Subject: RE: Trigger and Sequences Last I knew you couldn't end a CREATE TABLE command with a comma Why in the world are you doing this from CF??? -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 4:40 PM To: CF-Talk Subject: Trigger and Sequences Hi all, I am trying to create a table on a CF page and then create a sequence and a trigger on the same page. Every time I try to run the page the page times out and kills my server to boot. Which is no fun. Here is the basic stuff cfquery name=two datasource=ncc create table #answtable# ( FLDUNIQUE_ID number(10), FLDID number(11), FLDFIRSTNAME varchar(50), FLDLASTNAME varchar(50), /cfquery cfquery name=three datasource=ncc create sequence #answtable#_ID_SEQ INCREMENT BY 1 START WITH 1 NOMAXVALUE CACHE 20 /cfquery cfquery name=four datasource=ncc create or replace trigger BI_#answtable# before insert on #answtable# for each row begin select #answtable#_ID_SEQ.nextval into :new.FLDUNIQUE_ID from dual; end; /cfquery Any Suggestions? Bryan Langford Web Info Specialist National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 ?import namespace = t urn = urn:schemas-microsoft-com:time implementation = #default#time2 declareNamespace / __ 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
sql stored procs-need help
Hello, I am trying to create a stored procedure in SQL that will build a trigger only so far I have been completely unsuccessful due in part to my inexperience in the matter. I was hoping that anyone who has some experience in this matter might be able to help. Here is what I have been trying. Procedure TRIG_DTA (Trigtablename IN varchar, Tablename IN varchar, Seqtablename IN varchar) AS BEGIN CREATE OR REPLACE TRIGGER Trigtablename before insert on Tablename for each row begin select Seqtablename.nextval into :new.FLDUNIQUE_ID from dual end; END; Can anyone lend me some guidance on the matter? Bryan Langford Web Info Specialist National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 ?import namespace = t urn = urn:schemas-microsoft-com:time implementation = #default#time2 declareNamespace / __ 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
Trigger and Sequences
Hi all, I am trying to create a table on a CF page and then create a sequence and a trigger on the same page. Every time I try to run the page the page times out and kills my server to boot. Which is no fun. Here is the basic stuff cfquery name=two datasource=ncc create table #answtable# ( FLDUNIQUE_ID number(10), FLDID number(11), FLDFIRSTNAME varchar(50), FLDLASTNAME varchar(50), /cfquery cfquery name=three datasource=ncc create sequence #answtable#_ID_SEQ INCREMENT BY 1 START WITH 1 NOMAXVALUE CACHE 20 /cfquery cfquery name=four datasource=ncc create or replace trigger BI_#answtable# before insert on #answtable# for each row begin select #answtable#_ID_SEQ.nextval into :new.FLDUNIQUE_ID from dual; end; /cfquery Any Suggestions? Bryan Langford Web Info Specialist National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 ?import namespace = t urn = urn:schemas-microsoft-com:time implementation = #default#time2 declareNamespace / __ 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: Javascript does not want to change the current location
Heres a fix all I am giving two options for reframing it or breaking the frame entirely: in the up frame page write a call to the javascript : onclick=parent.frameNavig(); in the framset page itself write the javascript : function frameNavig() { //changes the frame to the page you want. // frames['mainFrame'].window.location=www.google.com; //breaks the frame entirely window.location=www.google.com; } -Original Message- From: Steve Oliver [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 9:38 AM To: CF-Talk Subject: RE: Javascript does not want to change the current location I may of misunderstood the question, but if you want it to go there in the current frame, why don't you just use a regular link with the target set to _self? _ steve oliver senior internet developer atnet solutions, inc. http://www.atnetsolutions.com -Original Message- From: Macarie Neculai [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 10:25 PM To: CF-Talk Subject: Javascript does not want to change the current location Hi! I have the following problem: have a page that uses frames, and the frame structure is something like this: -- | topbar | |- | menu | up | | | - | | | down | - in the up frame a have something like like this: script function goURL() { location.href='www.google.com'; } /script A href=# onClick=goURL();some link/A My problem is that the assignment from the goURL is not executed (the browser does not go to www.google.com). It works if I load www.google.com in all other frames, but it does not work to load it in the same frame as the link (up frame). I've tried top.main.up.location.href self.location.href . it just does not work with the current frame. Any help appreciated. Mack __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb 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
CFCookie and the old switcharoo - help!
Hey everyone, Anyone that read my recent posts CFCOOKIE and the old switcheroo. I am still looking for any other suggestion before I revert to using sessions instead of cookies. The basic problem is that I have a multiple user environment, a class room of students, each log in to take the test: Page1: cfform action=repreverification.cfm method=post cfoutput p br table width=75% border=0 tr td width=50%Welcome Back #cookie.repname#:/td td width=50% input type=hidden name=RepName value='#cookie.repname#' /td /tr tr td width=50% align=rightID:/td td width=50% CFinput type=text name=RepID maxlength=5 message=Your ID must be 5 digits in length size=20 required=Yes b(First 5 digits of SSN.)/b /td /tr /table If you are not #cookie.repname# a href=./logon.cfm?track=yesClick here/a pbr input type=submit name=Submit value=Submit /cfoutput /cfform That is submitted through the form action to repverification which builds the cookies. cfoutput cfparam name=value1 default= cfparam name=counter default= cfparam name=increment default=0 cfparam name=cookvalue default= cfset counter = '1' cfset cookvalue = '#form.repname#' /cfoutput !--- removes single and double quotes from entry --- cfloop condition=counter lt len(FORM.repname)+1 CFOUTPUT cfset value1='#counter#' cfif '#mid(form.repname,value1,1)#' EQ CHR(34) OR '#mid(form.repname,value1,1)#' EQ CHR(39) cfset cookvalue='#removechars(cookvalue,value1-increment,1)#' cfset increment = '#increment#' + 1 /cfif /CFOUTPUT Cfset Counter = counter + 1 /cfloop !--- cookies --- cfif isnumeric(form.repid) is 'yes' and len(form.repid) EQ 5 cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFCOOKIE NAME=CFID VALUE=#SESSION.CFID# CFCOOKIE NAME=CFTOKEN VALUE=#SESSION.CFTOKEN# CFcookie NAME=repname VALUE=#cookvalue# EXPIRES=2 CFcookie NAME=repid VALUE=#form.repid# EXPIRES=2 /cflock meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm cfabort cfelse The information you have provided as your ID is not numeric or does not contain 5 digits, please click back and enter the first 5 digits of your social security number. /cfif Lastly the repmenu is pulled up. cfquery name=blah datasource=ncc blockfactor=50 select #variables.mastertableansw#.fldname, #variables.mastertableansw#.fldid, #variables.mastertableansw#.testnumber, max(#variables.mastertableansw#.questionnumber) as maxquest, max(#variables.mastertable#.questnum) as maxq from #variables.mastertableansw#, #variables.mastertable# where fldname = '#cookie.repname#' and fldid = '#cookie.repid#' and #variables.mastertableansw#.testnumber = #variables.mastertable#.testnumber group by #variables.mastertableansw#.fldname, #variables.mastertableansw#.fldid, #variables.mastertableansw#.testnumber /cfquery cfoutput cfif #blah.fldname# is '' cfparam name=newmark default= cfset newmark = 'x' div align=centerbOur records indicate that you are a first time user. Please select from the following tests./b/div cfelse!-- this is the if that carries question and test number -- bWelcome Back #cookie.repname# your ID is #cookie.repid# #cookie.cftoken#/b /cfif /cfoutput The problem is that reps 1 - 20 all log in. Some reps get to the menu page and get they're own information display...I.E. Rep 5 logs in and gets: Welcome back rep5, But many of the reps get someone elses info Rep 2 logs in and gets: Welcome back rep 3 Rep 1 gets rep5 rep 7 gets rep 3 as well. etc. If anyone has ANY suggestions I would certianly appreciate it. I have 12 call centers full of trainees all waiting to take their tests. I'm starting to feel sorry that I ever switched to cookies from session vars. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. ~~ 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: CFCookie and the old switcharoo - help!
Hi david, Yeah actually I expired all the old cookies before beginning cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW Just to make sure that the old cookies no longer existed. On top of that I had the trainer of the course walk through a manual deletion of all cookies on each machine. the problem still persisted. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: David Cummins [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 1:53 PM To: CF-Talk Subject: Re: CFCookie and the old switcharoo - help! Sounds like there are old cookies on those machines from previous attempts. Maybe some machines now have cookie setting switched off, but of course the old cookies are still there. Try one of the machines with problems - turn cookie prompting on, etc. Maybe change the name of the cookie to rule out that possibility. David Langford, Bryan wrote: Hey everyone, Anyone that read my recent posts CFCOOKIE and the old switcheroo. I am still looking for any other suggestion before I revert to using sessions instead of cookies. The basic problem is that I have a multiple user environment, a class room of students, each log in to take the test: Page1: cfform action=repreverification.cfm method=post cfoutput p br table width=75% border=0 tr td width=50%Welcome Back #cookie.repname#:/td td width=50% input type=hidden name=RepName value='#cookie.repname#' /td /tr tr td width=50% align=rightID:/td td width=50% CFinput type=text name=RepID maxlength=5 message=Your ID must be 5 digits in length size=20 required=Yes b(First 5 digits of SSN.)/b /td /tr /table If you are not #cookie.repname# a href=./logon.cfm?track=yesClick here/a pbr input type=submit name=Submit value=Submit /cfoutput /cfform That is submitted through the form action to repverification which builds the cookies. cfoutput cfparam name=value1 default= cfparam name=counter default= cfparam name=increment default=0 cfparam name=cookvalue default= cfset counter = '1' cfset cookvalue = '#form.repname#' /cfoutput !--- removes single and double quotes from entry --- cfloop condition=counter lt len(FORM.repname)+1 CFOUTPUT cfset value1='#counter#' cfif '#mid(form.repname,value1,1)#' EQ CHR(34) OR '#mid(form.repname,value1,1)#' EQ CHR(39) cfset cookvalue='#removechars(cookvalue,value1-increment,1)#' cfset increment = '#increment#' + 1 /cfif /CFOUTPUT Cfset Counter = counter + 1 /cfloop !--- cookies --- cfif isnumeric(form.repid) is 'yes' and len(form.repid) EQ 5 cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFCOOKIE NAME=CFID VALUE=#SESSION.CFID# CFCOOKIE NAME=CFTOKEN VALUE=#SESSION.CFTOKEN# CFcookie NAME=repname VALUE=#cookvalue# EXPIRES=2 CFcookie NAME=repid VALUE=#form.repid# EXPIRES=2 /cflock meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm cfabort cfelse The information you have provided as your ID is not numeric or does not contain 5 digits, please click back and enter the first 5 digits of your social security number. /cfif Lastly the repmenu is pulled up. cfquery name=blah datasource=ncc blockfactor=50 select #variables.mastertableansw#.fldname, #variables.mastertableansw#.fldid, #variables.mastertableansw#.testnumber, max(#variables.mastertableansw#.questionnumber) as maxquest, max(#variables.mastertable#.questnum) as maxq from #variables.mastertableansw#, #variables.mastertable# where fldname = '#cookie.repname#' and fldid = '#cookie.repid#' and #variables.mastertableansw#.testnumber= #variables.mastertable#.testnumber group by #variables.mastertableansw#.fldname, #variables.mastertableansw#.fldid, #variables.mastertableansw#.testnumber /cfquery cfoutput cfif #blah.fldname# is '' cfparam name=newmark default= cfset newmark = 'x' div align=centerbOur records indicate that you are a first time user. Please select from the following tests./b/div cfelse!-- this is the if that carries question and test number -- bWelcome Back #cookie.repname# your ID is #cookie.repid# #cookie.cftoken#/b /cfif /cfoutput The problem is that reps 1 - 20 all log in. Some reps get to the menu page and get they're own information display...I.E. Rep 5 logs in and gets: Welcome back rep5, But many of the reps get someone elses info Rep 2 logs in and gets: Welcome back rep 3 Rep 1 gets rep5 rep 7 gets rep 3 as well. etc. If anyone has ANY suggestions I would
RE: CFCookie and the old switcharoo - help!
Well thanks for looking David, I too was concerned that it might be a logic problem, The difficulty is that it never happened with sessions and I essentially did a site wide replace of session. for cookie. and I never had the problem before I used cookies. I have picked through the code three times myself and had co-workers look it over as well. I appreciate the suggestions and I will try looking into these further, though I had the cache removed manually as well as the cookies in the same few steps. I also verified the browsers were the same as mine and the only difference seems to be that they are on a thin client, but I can't rule out the possibility of code error either. If you or anyone have any other thoughts, I am open to suggestions. Thanks for everything. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: David Cummins [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 2:36 PM To: CF-Talk Subject: Re: CFCookie and the old switcharoo - help! There are only three ways I can imagine it happening: 1. The wrong cookie values are being sent. I'm not sure how this would occur, but you should be able to see the entire cookie data in CGI.HTTP_COOKIE. 2. There is a caching problem - the cookies are set correct, but the page you see is completely disconnected from what you should be seeing. Try adding a random number on the url to test this. 3. There is a logic error in your page. I don't actually have time to look at your code sorry, but its always a possibility. David Langford, Bryan wrote: Hi david, Yeah actually I expired all the old cookies before beginning cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW Just to make sure that the old cookies no longer existed. On top of that I had the trainer of the course walk through a manual deletion of all cookies on each machine. the problem still persisted. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: David Cummins [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 1:53 PM To: CF-Talk Subject: Re: CFCookie and the old switcharoo - help! Sounds like there are old cookies on those machines from previous attempts. Maybe some machines now have cookie setting switched off, but of course the old cookies are still there. Try one of the machines with problems - turn cookie prompting on, etc. Maybe change the name of the cookie to rule out that possibility. David Langford, Bryan wrote: Hey everyone, Anyone that read my recent posts CFCOOKIE and the old switcheroo. I am still looking for any other suggestion before I revert to using sessions instead of cookies. The basic problem is that I have a multiple user environment, a class room of students, each log in to take the test: Page1: cfform action=repreverification.cfm method=post cfoutput p br table width=75% border=0 tr td width=50%Welcome Back #cookie.repname#:/td td width=50% input type=hidden name=RepName value='#cookie.repname#' /td /tr tr td width=50% align=rightID:/td td width=50% CFinput type=text name=RepID maxlength=5 message=Your ID must be 5 digits in length size=20 required=Yes b(First 5 digits of SSN.)/b /td /tr /table If you are not #cookie.repname# a href=./logon.cfm?track=yesClick here/a pbr input type=submit name=Submit value=Submit /cfoutput /cfform That is submitted through the form action to repverification which builds the cookies. cfoutput cfparam name=value1 default= cfparam name=counter default= cfparam name=increment default=0 cfparam name=cookvalue default= cfset counter = '1' cfset cookvalue = '#form.repname#' /cfoutput !--- removes single and double quotes from entry --- cfloop condition=counter lt len(FORM.repname)+1 CFOUTPUT cfset value1='#counter#' cfif '#mid(form.repname,value1,1)#' EQ CHR(34) OR '#mid(form.repname,value1,1)#' EQ CHR(39) cfset cookvalue='#removechars(cookvalue,value1-increment,1)#' cfset increment = '#increment#' + 1 /cfif /CFOUTPUT Cfset Counter = counter + 1 /cfloop !--- cookies --- cfif isnumeric(form.repid) is 'yes' and len(form.repid) EQ 5 cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFCOOKIE NAME=CFID VALUE=#SESSION.CFID
RE: Cookies and the old switcharoo
Thanks Eric, Indeed yes they are three separate .cfm pages. In the first form, called logon.cfm, a submit leads to the second page called verification.cfm. Once there, a meta refresh tag meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm takes you to the menu page called repmenu.cfm. As for the deletion of existing cookies and locked vars, those are both recent adds in an attempt to combat this problem. I know cookies over write each other, but something is cause people to come up with other peoples cookie, so I thought if I deleted all cookies before setting them, it may clear up some of the issues.. the locking was another attempt to keep each cookie unique to the user. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning -Original Message- From: Maia, Eric [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 1:01 PM To: CF-Talk Subject: RE: Cookies and the old switcharoo Are these three different requests? (i.e. they submit the form, and the verification page is run, then another HTTP request takes them to the menu page?) If not, your problem might be trying to set and access the cookies on the same page. Take another look at your app structure and make sure there's a request between setting cookies and reading them. Also, I don't think you're gaining anything by clearing and setting cookies on the same page, or by locking form variables. -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 12:42 PM To: CF-Talk Subject: Cookies and the old switcharoo Hey everyone, I am having a problems where I have created a log in page for representatives to take a test. The page creates rep cookies that, by the time the menu page is reached, have jumbled each client's variables to someone else's. For example, Steve and John and Sally log in and hit the menu page and the menu page displays johns name on Sally's computer, Sally might also display Sally and and Steve has himself too. But as you can tell this makes for terrible inserts and test taking. So I am looking for some suggestions... here is the code: Log on Page --- cfform action=repverification.cfm method=post h1Please enter the following information:/h1 p br table width=75% border=0 tr td width=14%Name: /td td width=86% cfinput type=text name=RepName size=20 required=Yes message=please enter your name /td /tr tr td width=14%ID:/td td width=86% CFinput type=text name=RepID maxlength=5 message=Your ID must be 5 digits in length size=20 required=Yes b(First 5 digits of SSN.)/b /td /tr /table pbr input type=submit name=Submit value=Submit /cfform This is the verification page's code: -- cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFcookie NAME=repname VALUE=#form.repname# EXPIRES=2 CFcookie NAME=repid VALUE=#form.repid# EXPIRES=2 /cflock and the menu just displays their name, this is a basic example so as to pare you a lot of verifying cfoutput Welcome Back #cookie.repname# your ID is #cookie.repid# #cookie.cftoken# /cfoutput Any help would be VERY appreciated. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning ~~ 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: Cookies and the old switcharoo
I am trying a new version of the verification page. Here it is. cfif isnumeric(form.repid) is 'yes' and len(form.repid) EQ 5 cfapplication name=PerfTracksessionmanagement=Yes cfcookie name=repname expires=NOW cfcookie name=cfid expires=NOW cfcookie name=cftoken expires=NOW cfcookie name=repid expires=NOW cflock name=repvars timeout=60 throwontimeout=Yes type=EXCLUSIVE CFCOOKIE NAME=CFID VALUE=#SESSION.CFID# CFCOOKIE NAME=CFTOKEN VALUE=#SESSION.CFTOKEN# CFcookie NAME=repname VALUE=#cookvalue# EXPIRES=2 CFcookie NAME=repid VALUE=#form.repid# EXPIRES=2 /cflock meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm cfabort I don't know if this will work, but its worth a shot. It seems to lock the cfid and and token. Any other suggestion would be nice. Oh, and Eric, the scenerio is that we have training classes around the country that have reps sitting in classes without a seating chart. I turns out the problem isn't that they are using the same machine though. I squared that away early because I thought that maybe the cookies weren't over writting for some reason. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. -Original Message- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 3:17 PM To: CF-Talk Subject: Re: Cookies and the old switcharoo I've had similar problems when I set up my auto-login feature, but it was mainly because I was using cflocation on the same page I was setting my cookie. I'm pretty sure you can't use cfhttp or cfheader either on the same page, along with a few other tags. Other than that, the only way they could be getting each other's cookies is if CF server recognizes their cfid and cftoken as someone else's. As Eric stated below, these are set from cfapplication and/or being passed in the URL strings...are they perhaps sharing links? For me, at least, it's always the little things... Tyler Silcox email | [EMAIL PROTECTED] website | www.gslsolutions.com - Original Message - From: Maia, Eric [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, November 09, 2001 5:51 PM Subject: RE: Cookies and the old switcharoo I'm still not sure exactly what's going on here, but here are some musings in case you haven't already explored these leads: 1. Are these reps using the same machine to log in, or do they each have a separate machine? Your cookies would only be causing the problem if they are on the same machine. 2. Bear in mind that CF will be setting 4 cookies: cfid, cftoken, repname, repid. (the first two are set automatically by the cfapplication call.) One thing you might try is clear all four cookies on the form page, so you're sure you're starting from a blank slate. (If I remember correctly, the main time I ran into this problem was when I was trying to set client variables and offer users the option of auto-login as a convenience. e.g. on login page, check for client.rememberme and if so, bypass the login, just pull user info from db based on client.userid... got all messed up, and people were getting each others' sessions all over the place. I went back to forcing everyone to log in, and it's been fine for over a year.) -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 1:50 PM To: CF-Talk Subject: RE: Cookies and the old switcharoo Thanks Eric, Indeed yes they are three separate .cfm pages. In the first form, called logon.cfm, a submit leads to the second page called verification.cfm. Once there, a meta refresh tag meta http-equiv=refresh content=.1; URL=nhrepmenu.cfm takes you to the menu page called repmenu.cfm. As for the deletion of existing cookies and locked vars, those are both recent adds in an attempt to combat this problem. I know cookies over write each other, but something is cause people to come up with other peoples cookie, so I thought if I deleted all cookies before setting them, it may clear up some of the issues.. the locking was another attempt to keep each cookie unique to the user. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning -Original Message- From: Maia, Eric [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 1:01 PM To: CF-Talk Subject: RE: Cookies and the old switcharoo Are these three different requests? (i.e. they submit the form, and the verification page is run, then another HTTP request takes them to the menu page?) If not, your problem might be trying to set and access the cookies on the same page. Take another look at your app structure and make sure there's a request between setting cookies and reading them. Also, I don't think you're gaining anything by clearing and setting cookies on the same page, or by locking form variables. -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED
Dealing with nulls while adding two columns together
Hey everyone, I have two separate views that pull numeric data from a table using SQL. I am looking to add the two together in another view before bringing it back with cold fusion for display. My problem is that if either table has a null value data field where the join fields are equal, the request comes back blank. So I have tried coalesce and even went as far as trying an old trick I learned when I developed Access databases which was to use NZ(table.field)+NZ(table2.field2) but as expected, that errored out. Does anyone have some suggestion I might try to correct this problem and if so, what are they? ~~ 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: Dealing with nulls while adding two columns together
Ben, Thanks for the suggestion. After researching this option I now have another question: will this allow me to produce the effect I am looking for because both tables can have null values. An example would be: Table1 ID Value 1 5 2 7 3 4 15 Table2 ID Value 1 2 5 3 12 4 16 5 3 So the result set I am looking for would be: 5, 12, 12, 31, 3 Thanks, Bryan Langford -Original Message- From: Braver, Ben [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:20 PM To: CF-Talk Subject: RE: Dealing with nulls while adding two columns together Bryan, 2 quick comments: 1. NZ is a Microsoft Access function. It's basically just an IIf saying if the field is not null, pass the contents of the field, but if the field is null, pass a zero. 2. The default join type is an inner join where the field exists in both tables. Look up outer joins where the field is optional in one of the tables. HTH. -Ben -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:10 PM To: CF-Talk Subject: Dealing with nulls while adding two columns together Hey everyone, I have two separate views that pull numeric data from a table using SQL. I am looking to add the two together in another view before bringing it back with cold fusion for display. My problem is that if either table has a null value data field where the join fields are equal, the request comes back blank. So I have tried coalesce and even went as far as trying an old trick I learned when I developed Access databases which was to use NZ(table.field)+NZ(table2.field2) but as expected, that errored out. Does anyone have some suggestion I might try to correct this problem and if so, what are they? ~~ 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: Dealing with nulls while adding two columns together
Thanks again Ben, I'll give it a shot first thing in the morning. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: Braver, Ben [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:50 PM To: CF-Talk Subject: RE: Dealing with nulls while adding two columns together Bryan, Sounds like a case for a Union query. (Excuse the explanation if you already know what one is.) In a Union query, you run separate queries, then perform the Union of their two result sets. You can do this with or without duplicate rows. So one query returns 5, 7, 15 The otherreturns 5, 12, 16, 3 The Union contains 3, 5, 5 (optionally), 7, 12, 15, 16. MS Access can do Union queries, so the Help items on this might be a good learning tool. HTH. -Ben -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:36 PM To: CF-Talk Subject: RE: Dealing with nulls while adding two columns together Ben, Thanks for the suggestion. After researching this option I now have another question: will this allow me to produce the effect I am looking for because both tables can have null values. An example would be: Table1 ID Value 1 5 2 7 3 4 15 Table2 ID Value 1 2 5 3 12 4 16 5 3 So the result set I am looking for would be: 5, 12, 12, 31, 3 Thanks, Bryan Langford -Original Message- From: Braver, Ben [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:20 PM To: CF-Talk Subject: RE: Dealing with nulls while adding two columns together Bryan, 2 quick comments: 1. NZ is a Microsoft Access function. It's basically just an IIf saying if the field is not null, pass the contents of the field, but if the field is null, pass a zero. 2. The default join type is an inner join where the field exists in both tables. Look up outer joins where the field is optional in one of the tables. HTH. -Ben -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 4:10 PM To: CF-Talk Subject: Dealing with nulls while adding two columns together Hey everyone, I have two separate views that pull numeric data from a table using SQL. I am looking to add the two together in another view before bringing it back with cold fusion for display. My problem is that if either table has a null value data field where the join fields are equal, the request comes back blank. So I have tried coalesce and even went as far as trying an old trick I learned when I developed Access databases which was to use NZ(table.field)+NZ(table2.field2) but as expected, that errored out. Does anyone have some suggestion I might try to correct this problem and if so, what are they? ~~ 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: Disabling back button
I have only found one way to do this with a modicum of simplicity. Basically its javascript. You have to open a new window and remove the standard toolbars from the window and include a code to remove right click. Then on unload of the page that opened the new window commit a self.close. I have also heard rumors that there is an easier way to do this using history=no but I have never taken the time to research its validity. Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 12:51 PM To: CF-Talk Subject: Disabling back button Is there a possible and simple way to do this - or is it a nightmare to do? Will ~~ 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: Character Code....
Here is the code for an ascii character generator that I wrote. Its a text field that will give you up to ten individual ASCII characters from a string. cfform action= method= cfoutput#dateformat(now())#/cfoutput cfinput type=Text name=date value=#dateformat(Now(), dd-mmm-yy)# /cfform H3Asc Example/H3 cfparam name=counter default= cfset counter = '1' !--- if the character string is not empty, then output its ascii value --- cfif IsDefined(FORM.charVals) cfloop condition=counter lt len(FORM.charVals)+1 cfparam name=value1 default= CFOUTPUTcfset value1='#counter#' cfset value2 = '#mid(FORM.charVals,value1,1)#' #mid(FORM.charVals,value1,1)# #Asc(value2)#/CFOUTPUT Cfset Counter = counter + 1 /cfloop CFELSE !--- if it is empty, output an error message --- H4Please enter a character/H4 /cfif FORM ACTION=asc.cfm METHOD=POST PType in a character(s) to see its ASCII value. No more than 10 characters. BRINPUT TYPE=Text NAME=CharVals size=10 MAXLENGTH=10 PINPUT TYPE=Submit NAME= INPUT TYPE=RESET /FORM Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: Kevin Mansel [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 12:40 PM To: CF-Talk Subject: Character Code does anyone know the chr() code for the apostrophe? ~ Kevin Mansel Senior Web Developer Fox Communications [EMAIL PROTECTED] DL : 425-649-1321 C : 425-346-7221 ~~ 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
Frameset problem using cgi.http_referrer
Hello, I am looking for a way to retrieve the location of a page embedded into a frameset. I have a log on page built to catch users who have timed out and wish to return users back to the page from which they came. I am currently using a meta tag in combination with the HTTP_REFERER, but the problem is that some of the pages from which users are coming are in a frameset's main window. Here is what I currently have: In the log on page I have input type=hidden name=referer_url value=#CGI.HTTP_REFERER# The verification page then sets the variables and calls the meta meta http-equiv=refresh content=.1; url=#newurl# I even went as far as to try JavaScript: window.history.go (-2) so I am looking for a way to target the main frame or lower frame of a frameset. Bryan Langford Web Info Specialist National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. ~~ 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 I think
David, Yeah, definitely. Array is the only way to go when you need reference numbers. You might consider a parallel array. basically cfset my_list = arraynew(1) cfset my_list2 = arraynew(1) cfset my_list[1]= dog cfset my_list[2]= cat cfset my_list[3]= etc cfset my_list2[1]= grey cfset my_list2[2]= black cfset my_list2[3]= etc cfoutputThe #my_list2[2]# #my_list[1]#/cfoutput should output: The black dog or you can loop through your array for more outputs by indexing cfloop index=i from=1 to=10 cfoutputThe #my_list2[i]# #my_list[i]#/cfoutput /cfloop Bryan Langford -Original Message- From: David Misha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 2:43 PM To: CF-Talk Subject: Array i think I have: cfset my_list = Dogs,Cats,Mouse,Elephant cfset colors = Brown,Black,Grey,Pink I want to get: The Brown Dog the Black Cat The Grey Mouse The Pink Elephant ~~ 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
Winnt Logons (?)
Howdy everybody, Does anyone know if its at all possible to grab a user's WINNT log-on name and store it as a cookie? Bryan Langford ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Winnt Logons (?)
Thanks, I'll give that a shot. And to boot, I'll word my questions more definitively in the future. :-) Bryan Langford Analyst National Customer Operations Enterprise Services Strategic Planning Training Development and Design Team. Desk: 714-695-4824 Cell: 714-270-8451 -Original Message- From: Jann VanOver [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:27 PM To: CF-Talk Subject: RE: Winnt Logons (?) Okay, just to prove I'm not that cruel ... I've done this with IIS. Tell IIS to NOT allow anonymous logins. It will then send out the NT Challenge/response the first time a user hits a page. Catch the remote_user and put it in a cookie. -Original Message- From: Lee Fuller [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:18 PM To: CF-Talk Subject: RE: Winnt Logons (?) LOL (That's cruel!) -Original Message- From: Jann VanOver [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 3:08 PM To: CF-Talk Subject: RE: Winnt Logons (?) Yes, it is possible. -Original Message- From: Langford, Bryan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 2:59 PM To: CF-Talk Subject: Winnt Logons (?) Howdy everybody, Does anyone know if its at all possible to grab a user's WINNT log-on name and store it as a cookie? Bryan Langford ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists