OT: Alter table question
Before I spend too long looking, does anyone know if its possible to ALTER TABLE and insert a field in other than the last ordinal_position??? This query adds a column in the last position.. cfquery name="addfield" datasource="#default_datasource#" ALTER TABLE #table# ADD #form.column_name# #form.type_name#cfif #form.type_name# is "varchar"(#form.length#)/cfif #null# /cfquery like so. column1 column2 the new column is added here I want... column1 Insert a column here column2 Jeff Craig ~~ 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: Help
My first thoughts. Are you running NT 4? Which service pack is installed on your server. SP 1,2,3,4,5,6?? I used to have a problem with NT. Where it wasn't sure if it was NT or UNIX. The problem was that I would create a file "File.cfm" Then latter I'd create a new file "file.cfm" NT would apparently be case sensitive and think these were 2 different files. But it would not allow me to make any updates to either one. The only way to make any updates was to delete the file(s) and save a new copy. I'm not really sure at this point if it was a Service pack issue or just that now I open the file on the server with the exact file name and then re-save the exact file name just as a habit. It has been a few years since I had the problem. Anyhow that is the only situation I remember where deleting the old file(s) and saving a new copy would cure a problem.. Jeff Craig - Original Message - From: "CT, Loo" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, January 13, 2001 12:40 AM Subject: Re: Help Dear all, First of all, I would like to thanks all that responded to my call for help. Really appreciated. Well, the problem is solved now. It was not due to error in code logic. It was something to due to the system which I don't know what exactly it is. Here is what I did to resolve the problem (Just to share) The server is remote from where I work. I am in MY but the server is in HK. There was one incident in my troubleshooting process triggered my thought of deleting the file and then upload the file from my machine. I delete the file and upload the file that work on my machine (which is actually the same with the one I deleted from the remote system) and guess what it works!!! I am still wonder why this doesn't work by replacing the file without deleting it (Overwrite ) If you have reasoning, please let me know. Thank you. Regards, looct - Original Message - From: Mak Wing Lok [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, January 13, 2001 8:19 AM Subject: Re: Help more details on this would be more help, did the error appear to be a CF error or your web server error? my wild guess is that your machine did not have access to a specific page on your web server, try to troubleshoot on the access right. - Original Message - From: CT, Loo [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, January 13, 2001 12:25 AM Subject: Help Dear all, I am having problem with one of my CF project. There is a page that display query 10 query results per page. if the result consists of more than 10 records, there will be link at bottom of the page linking to next 10 records, However, when I click on the link it gives me "Error:Acess is Denied". This project somehow works fine on one machine but not the other. I am totally blank where o trouble shoot this problem, could anyone out there that ever came across this kind of error message,please give me a some clue where to look into the problem. Thanks looct ~~ 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
wddx??
ok I'm trying to have peace talks with wddx. Here is the code the wddx packet and the way the page looks. So now what? Is there something majic to creating a usable webpage from here OR does it become an exercize in string manipulation?? OR should I go CFML2js and deal with javascript?? Any advise would be appreciated. CODE: cfquery name="qryTest2" datasource="northwind" select top 1 CustomerID, ContactTitle, ContactName from customers /cfquery cfwddx action="CFML2WDDX" input="#qrytest2#" output="qoutput" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body cfoutput#qoutput#/cfoutput /body /html WDDX PACKET wddxPacket version='0.9'header/headerdatarecordset rowCount='1' fieldNames='CUSTOMERID,CONTACTTITLE,CONTACTNAME'field name='CUSTOMERID'stringALFKI/string/fieldfield name='CONTACTTITLE'stringSales Representative/string/fieldfield name='CONTACTNAME'stringMaria Something/string/field/recordset/data/wddxPacket PAGE: ALFKISales RepresentativeMaria Something ~~ 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: wddx??
The final outcome I'm looking for is to automatically generate a forms to add/edit/delete records from various tables. My thinking was to have tables like User fields UserID, WDDXPacket, FieldList?? Still thinking. My first problem is how to automatically build a form from a wddx packet. Then go on to how to determine what type of form field to build ie. text, hidden, checkbox. Jeff Craig. - Original Message - From: "Stephen Moretti" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 12, 2001 6:50 AM Subject: RE: wddx?? Jeff, ok I'm trying to have peace talks with wddx. What is it you are trying to do? What's the outcome that you want? Regards Stephen ~~ 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: wddx??
Well I have a start. It is out putting the wddx packet to .cfm form fields. Now to see if I can get these wddx output fields to show inside another query. -- cfoutput query="formbuildingquery" #wddxquery.fieldname# /cfoutput -- This works as I needed. cfquery name="qryTest2" datasource="northwind" select top 1 CustomerID, ContactTitle, ContactName from customers /cfquery cfwddx action="CFML2WDDX" input="#qrytest2#" output="qoutput" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body cfwddx action="WDDX2CFML" input="#qoutput#" output="foutput" cfoutput table tr td #foutput.customerID# /td /tr tr td #foutput.ContactTitle# /td /tr tr td #foutput.ContactName# /td /tr /table /cfoutput /body /html - Original Message - From: "Neil Giarratana" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 12, 2001 7:56 AM Subject: RE: wddx?? Not sure where you're going with this. I would expect that if you did a "View Source" on the page, you would see your wddx code exactly as you have it. Are you expecting it to show as a tree in IE5 like documents with an ..xml extension? How are you intending it to display? Regards, Neil ~~ 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: wddx?? IT WORKS :o))
cfset fields = "CustomerID,ContactTitle,ContactName" cfquery name="qryTest2" datasource="northwind" select top 1 #Fields# from customers /cfquery cfwddx action="CFML2WDDX" input="#qrytest2#" output="qoutput" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body cfwddx action="WDDX2CFML" input="#qoutput#" output="foutput" cfoutput table cfloop index="fieldname" list="#fields#" delimiters="," tr td bgcolor="Yellow" align="right" #Fieldname#: /td td #Evaluate("foutput." Fieldname)# /td /tr /cfloop /table /cfoutput /body /html - Original Message - From: [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 12, 2001 8:31 AM Subject: Re: wddx?? Well I have a start. It is out putting the wddx packet to .cfm form fields. Now to see if I can get these wddx output fields to show inside another query. -- cfoutput query="formbuildingquery" #wddxquery.fieldname# /cfoutput -- This works as I needed. cfquery name="qryTest2" datasource="northwind" select top 1 CustomerID, ContactTitle, ContactName from customers /cfquery cfwddx action="CFML2WDDX" input="#qrytest2#" output="qoutput" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body cfwddx action="WDDX2CFML" input="#qoutput#" output="foutput" cfoutput table tr td #foutput.customerID# /td /tr tr td #foutput.ContactTitle# /td /tr tr td #foutput.ContactName# /td /tr /table /cfoutput /body /html - Original Message - From: "Neil Giarratana" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 12, 2001 7:56 AM Subject: RE: wddx?? Not sure where you're going with this. I would expect that if you did a "View Source" on the page, you would see your wddx code exactly as you have it. Are you expecting it to show as a tree in IE5 like documents with an ..xml extension? How are you intending it to display? Regards, Neil ~~ 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: Query confusion - CF not recognising query name
Phillip, A couple of suggestions. I use debugging on a production servers all the time. If you have access to the CF Admin, I turn on debugging for my IP address. Since I'm on dial-up and my ISP drops my connection all the time. I have to change IP addresses that the debug shows on about every half hour. While I'm debugging. When I don't have the luxury of turning on debug. I use this to see what is being passed. cfif #cgi.Remote_addr# is "123.456.789.123" cfoutput Whatever variables I'm looking to trace. #PreserveSingleQuotes(variables.whereList)# #variables.peopletable# #variables.idlist# #form.orderby# /cfoutput /cfif I did run your query against one of my usertables and it ran fine without the wherelist and got the idcount to showup I'm guessing you have some record(s) with special characters that are causing the problem. Just try to get one record to work see if the problem is in the code or a record issue. ~~ 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: Query confusion - CF not recognising query name
I just took out the and #PreserveSingleQuotes(variables.whereList)# --- set some variables and it worked fine for me. What's in the wherelist?? It ran fine for me. cf 4.01 on Windows 2000 server. Jeff Craig cfset variables.peopletable = "users" cfset variables.idlist = "1,2,3,4,5,6" cfset form.orderby = "email" cfquery name="getPeopleInfo" datasource="voluma" blockfactor=100 select ID from #variables.peopleTable# (nolock) where ID in (#variables.IDList#) order by #form.OrderBy# /cfquery cfset variables.IDCount=getPeopleInfo.RecordCount cfoutput#variables.idcount#/cfoutput ~~ 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: how to match dates?
This is one method of getting todays orders. SELECT OrderID FROM Orders WHERE (DATEPART(d, OrderDate) = DATEPART(d, { fn NOW() })) AND (DATEPART(m, OrderDate) = DATEPART(m, { fn NOW() })) AND (DATEPART(yy, OrderDate) = DATEPART(yy, { fn NOW() })) Jeff Craig - Original Message - From: "JB Mentzer" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, January 06, 2001 1:01 AM Subject: how to match dates? Hi all I'm trying to write a query to find records matching today's date. What I have is: CFSET timestamp = #DateFormat(now(),"-mm-dd")# !--- find based on date --- CFQUERY DATASOURCE="#SESSION.dsn#" NAME="gm_drawings_bydate" SELECT * FROM uprr_drawings dwg WHERE dwg.mod_date = #timestamp# /CFQUERY From the table, the data looks like this: 1/5/2001 22:42:09, 11/13/2000 07:47:16 and so on ... All ideas appreciated! * john * ~~ 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
WOT: SQL 7 SP3 on Windows 2000 server. Weird?
I have have a 20 gig hard drive that I formated the whole drive C into one partition. 20 gigs. Now I'm trying to put SQL 7 SP3 on it. When I try in unpack the service pack it pops up and says there is not enough space on the hard drive free up 76 meg and try again... Weird because there is 16 gig of free space.. Anyone run into this?? ~~ 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: Structures?????
Thank's for the responses. I couldn't quit get a structure to do what I wanted. Structures apparently will not sort. So I am trying it will an array. I was working on generating automatic forms from a table query. I had figured out how to create the input type="text, checkbox, radio... But trying to create a dropdown I got stuck trying to do a loop over a loop. I got the country dropdown to work. cfoutput query="qrytable" cfif #type_name# is "int" cfif #right(column_name, 2)# is "ID" cfif IsDefined("session.countries") cfinclude template="/country.cfm" /cfif /cfif /cfif /cfoutput Like so. CFQUERY NAME="qrycountry" DATASOURCE="datasource" SELECT countryid, #client.l# as country FROM countries /CFQUERY CFSET session.countries=ArrayNew(2) CFLOOP QUERY="qrycountry" CFSET session.countries[CurrentRow][1]=qrycountry.CountryID[CurrentRow] CFSET session.countries[CurrentRow][2]=qrycountry.Country[CurrentRow] /CFLOOP CFSET Total_Records=qrycountry.RecordCount select name="CountryID" option value=""Select Country/option CFLOOP INDEX="Counter" FROM=1 TO="#Total_Records#" CFOUTPUT option value="#session.countries[Counter][1]#"#session.countries[Counter][2]#/opt ion /CFOUTPUT /CFLOOP /select - Original Message - From: [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, December 15, 2000 7:53 AM Subject: RE: Structures? You're overwriting the same structure with each row. Try this: cfquery name="thequery" datasource="datasource" select * from ads /cfquery Cfset stads = structnew() cfoutput query="thequery" cfset structinsert(stads, thequery.adid, structnew()) Cfset stads[thequery.adid].CDate = thequery.cdate .. etc for other fields ... /cfoutput cfloop index="ii" list="#StructKeyList(stads)#" CFOUTPUT AdID is #ii# CDate is #stads[ii].cdate# ... etc for other fields ... /CFOUTPUT /cfloop -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 14, 2000 3:55 PM To: CF-Talk Subject: Structures? I'm getting frustrated with this. I want to build a structure from a query with multiple fields in each record in the structure. Then query the structure for a particular row. In other words use a structure like a DB table insert/edit/delete. I seem to be getting only one record in the structure. Anyone see what is wrong with this code?? cfquery name="thequery" datasource="datasource" select * from ads /cfquery cfscript stads = StructNew(); stads.adID="#thequery.adID#"; stads.CDate="#thequery.CDate#"; stads.Email="#thequery.Email#"; stads.Phone="#thequery.Phone#"; stads.City="#thequery.City#"; stads.AdDesc="#thequery.AdDesc#"; /cfscript cfloop query="thequery" CFSCRIPT stads=StructNew(); StructInsert(stads, "adID", "#thequery.adID#"); StructInsert(stads, "CDate", "#thequery.CDate#"); StructInsert(stads, "email", "#thequery.email#"); StructInsert(stads, "phone", "#thequery.phone#"); StructInsert(stads, "City", "#thequery.City#"); StructInsert(stads, "AdDesc", "#thequery.AdDesc#"); /CFSCRIPT /cfloop cfloop index="ii" list="#StructKeyList(stads, ',')#" delimiters="," CFOUTPUT AdID is #StructFind(stads, "AdID")# CDate is #StructFind(stads, "CDate")# EMail is #StructFind(stads, "email")# Phone is #StructFind(stads, "phone")# City is #StructFind(stads, "City")# AdDesc is #StructFind(stads, "AdDesc")# /CFOUTPUT /cfloop ~~ 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
OT: SQL 7 INFORMATION_SCHEMA.COLUMNS -- Head scratcher.
I run this query on a VIEW and I get a list of the column_name's with a data_type of bit. SELECT DATA_TYPE, TABLE_NAME, ORDINAL_POSITION, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = N'defaultview') AND (DATA_TYPE = N'bit') ORDER BY ORDINAL_POSITION I change the query to get the data_type of a column_name and all the column names that were just listed as bit come back as data_type int.. SELECT DATA_TYPE, ORDINAL_POSITION, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE (TABLE_NAME = N'defaultview') AND (COLUMN_NAME = N'status') ORDER BY ORDINAL_POSITION ~~ 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: NULL problem in Query
try WHERE WhenSubmitted IS NULL - Original Message - From: "Gene Kraybill" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, December 20, 2000 7:19 PM Subject: NULL problem in Query Mystery. Can someone tell me what I'm missing? I have an Access date field called WhenSubmitted. I start with the field populated. Then I run this test: CFQUERY NAME="SetNull" DATASOURCE="vasco1new" UPDATE Orders SET WhenSubmitted=NULL WHERE OrderID=4 /CFQUERY I manually check the field. It is now empty, presumably set to NULL. But when I run the following, I get a record count of 0. CFQUERY NAME="GetNull" DATASOURCE="vasco1new" SELECT * FROM Orders WHERE WhenSubmitted=NULL; /CFQUERY CFOUTPUT#GetNull.RecordCount#/CFOUTPUT Gene Kraybill - Gene Kraybill LPW Associates LLC www.lpw.net ~~ 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: SQL DROP TABLE
Gary, select name from sysobjects where name = 'tablename' That should tell you if the table exists. Jeff Craig ICQ 51303123 - Original Message - From: "Gary McNeel, Jr." [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, December 15, 2000 6:36 PM Subject: SQL DROP TABLE I am trying to use cfquery to drop a table. That works fine.\ Problem: If I run the DROP TABLE on a database where the table is already gone I get a nasty SQL error. Is there a simple way to check for the existance of the table, and if present, then drop it? My mind is mush right now and I cannot figure this one out. Thank all. Regards, Gary McNeel, Jr. DACNet Project Manager Research and Graduate Studies Rice University [OP] 713-348-6266 [M] 713-962-0885 [HO] 713-723-9240 ~~ 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
Structures?????
I'm getting frustrated with this. I want to build a structure from a query with multiple fields in each record in the structure. Then query the structure for a particular row. In other words use a structure like a DB table insert/edit/delete. I seem to be getting only one record in the structure. Anyone see what is wrong with this code?? cfquery name="thequery" datasource="datasource" select * from ads /cfquery cfscript stads = StructNew(); stads.adID="#thequery.adID#"; stads.CDate="#thequery.CDate#"; stads.Email="#thequery.Email#"; stads.Phone="#thequery.Phone#"; stads.City="#thequery.City#"; stads.AdDesc="#thequery.AdDesc#"; /cfscript cfloop query="thequery" CFSCRIPT stads=StructNew(); StructInsert(stads, "adID", "#thequery.adID#"); StructInsert(stads, "CDate", "#thequery.CDate#"); StructInsert(stads, "email", "#thequery.email#"); StructInsert(stads, "phone", "#thequery.phone#"); StructInsert(stads, "City", "#thequery.City#"); StructInsert(stads, "AdDesc", "#thequery.AdDesc#"); /CFSCRIPT /cfloop cfloop index="ii" list="#StructKeyList(stads, ',')#" delimiters="," CFOUTPUT AdID is #StructFind(stads, "AdID")# CDate is #StructFind(stads, "CDate")# EMail is #StructFind(stads, "email")# Phone is #StructFind(stads, "phone")# City is #StructFind(stads, "City")# AdDesc is #StructFind(stads, "AdDesc")# /CFOUTPUT /cfloop ~~ 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: Big companies using CF
Joe, You did say "new IT Director". My suggestion is to learn to "LOVE" ASP or find a new job. Pointing out to your new boss the errors in his thinking will will be about as logical as the current presidential political arguments. :o)) Jeff Craig - Original Message - From: "Joe Sheble aka Wizaerd" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, December 05, 2000 8:00 AM Subject: Re: Big companies using CF having worked for onvia.com (their newly aquired phoenix office) I wouldn't offer them as being a good or even efficient example of CF usage... - Original Message - From: "Michael She" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, December 05, 2000 5:59 AM Subject: Re: Big companies using CF onvia.com and even Hewlett Packard uses it for their site. At 07:18 PM 12/04/00 -0700, Joe Sheble aka Wizaerd you wrote: I know this is probably one of those discussions that turn up all the time on a mailing list such as this, and I apologize for bringing it up. I have a new IT Director starting at my company in the very near future who's a big Microsoft fan, and thinks there's nothing better than ASP and/or C# (which I believe hasn't even been released yet, no?). When I told him that CF has been around for a long time, and some really big companies use it, he doubted it. I told him Amazon.com was using it (was I right about this?). So anyway, I've agreed to compile a list of some of the bigger well known internet comapnies using it, and would like some assistance. What big time comapnies are using CF for their pages? thanx... Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = ~~ 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
Anyone familiar with php?
This is a multi-part message in MIME format. --=_NextPart_000_09AB_01C04FC2.7DA94970 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Problem one registration form that posts to a local action form against = one data structure and also posts to a remote php action form. I can't see the variables posted to the = remote form..=20 I told that a record is being posted to the remote datasource but all = the fields are empty.=20 Anyone familiar with php. I haven't been able to get the remote script = to know what is happening there. There link looks like = http://www.name.com/form.php2?variable=3D$variablevariable2=3D$variable2= Here is how I am trying to send the URL variables to the form. See = anything wrong?? Should I try changing the method to GET??=20 cfhttp url=3D"Http://www.name.com/form.php3" method=3D"POST" = resolveurl=3D"true" cfif #form.title# is 0 cfhttpparam type=3D"URL" name=3D"variable" value=3D"01" cfelseif #form.title# is 1 cfhttpparam type=3D"URL" name=3D"variable" value=3D"02" cfelseif #form.title# is 2 cfhttpparam type=3D"URL" name=3D"variable" value=3D"03" cfelse cfhttpparam type=3D"URL" name=3D"varibable" value=3D"04" /cfif --=_NextPart_000_09AB_01C04FC2.7DA94970 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVFONT face=3DArial size=3D2Problem one registration form that = posts to a local=20 action form against one data structure and also posts/FONT/DIV DIVFONT face=3DArial size=3D2to a remote php action form. I can't = see the=20 variables posted to the remote form.. /FONT/DIV DIVFONT face=3DArial size=3D2I told that a record is being posted to = the remote=20 datasource but all the fields are empty. /FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2Anyone familiar with php. I haven't = been able to=20 get the remote script to know what is happening there./FONT/DIV DIVFONT face=3DArial size=3D2There link looks like A=20 href=3D"http://www.name.com/form.php2?variable=3D$variableamp;variable2=3D= $variable2amp;"http://www.name.com/form.php2?variable=3D$variableamp;v= ariable2=3D$variable2amp;/A/FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2Here is how I am trying to send the URL = variables=20 to the form. See anything wrong??/FONT/DIV DIVFONT face=3DArial size=3D2Should I try changing the method to = GET??=20 /FONT/DIV DIVnbsp;/DIV DIVFONT face=3DArial size=3D2lt;cfhttp = url=3D"Http://www.name.com/form.php3"=20 method=3D"POST" resolveurl=3D"true"gt;BRnbsp;lt;cfif #form.title# = is=20 0gt;BRnbsp;nbsp;lt;cfhttpparam type=3D"URL" name=3D"variable"=20 value=3D"01"gt;BRnbsp;lt;cfelseif #form.title# is=20 1gt;BRnbsp;nbsp;lt;cfhttpparam type=3D"URL" name=3D"variable"=20 value=3D"02"gt;BRnbsp;lt;cfelseif #form.title# is=20 2gt;BRnbsp;nbsp;lt;cfhttpparam type=3D"URL" name=3D"variable"=20 value=3D"03"gt;BRnbsp;lt;cfelsegt;BRnbsp;nbsp;lt;cfhttpparam = type=3D"URL"=20 name=3D"varibable"=20 value=3D"04"gt;BRnbsp;lt;/cfifgt;/FONT/DIV/BODY/HTML --=_NextPart_000_09AB_01C04FC2.7DA94970-- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: SQL Server error
I had a similiar error once. That problem was that the single user option had gotten checked. That is under properties the access can be set to DBO use only - Single user - Read only Jeff Craig - Original Message - From: "Al Musella, DPM" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Thursday, November 16, 2000 10:11 AM Subject: SQL Server error I am getting 2 strange errors.. ODBC Error Code = 37000 (Syntax error or access violation) | [Microsoft][ODBC SQL Server Driver][SQL Server]Database 'thethin' is already open and can only | have one user at a time. | ODBC Error Code = S1T00 (Timeout expired) [Microsoft][ODBC SQL Server Driver]Timeout expired The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (69:1) to (69:89) in the template file D:\THETHIN\FAQS.CFM. = the query is simple: cfquery name="list" datasource="#SQLds#" username="#sqluser#" password="#sqlpassword#" select id,submitted,q,score from faq where (approved = 1) cfif category is not '-1' and cfif findnocase('1', category)category like '%1%'cfset more=1/cfif cfif findnocase('2', category)cfif more is 1 or cfelsecfset more=1/cfifcategory like '%2%'/cfif cfif findnocase('3', category)cfif more is 1 or cfelsecfset more=1/cfifcategory like '%3%'/cfif cfif findnocase('4', category)cfif more is 1 or cfelsecfset more=1/cfifcategory like '%4%'/cfif cfif findnocase('5', category)cfif more is 1 or cfelsecfset more=1/cfifcategory like '%5%'/cfif cfif findnocase('6', category)cfif more is 1 or cfelsecfset more=1/cfifcategory like '%6%'/cfif /cfif cfif sortby is 'score' order by score desc,submitted desc cfelse order by submitted desc,score desc /cfif /cfquery === This is SQL server 7, Cold fusion 4.5.1 - on separate boxes.. There has been no change to the cold fusion templates on this website in about 6 months. These errors started popping up very infrequently a few weeks ago.. Maybe once every few days. When the first error happens, I have to reboot the cold fusion server and it works again. The second one clears itself quickly and works again. The only change I see is a increase in the database size, as well as an increase in the number of visitors to the site. When this happens, other databases still work. That query takes only about 200ms. How could it time out? Any ideas? I do not have any other programs opening it - the servers are co-located, and do not even have MS access installed. I do use MTS packages to copy the database to my home computer a few times a day.. would that exclusively lock the table and cause problems? Thanks Al Musella, DPM A1webs.com -- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: OT:SQL Error in CF but not Access
Probably change )="#FORM.MomMonth#")) to )='#FORM.MomMonth#')) Jeff Craig - Original Message - From: "Rosa, Issac" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, November 10, 2000 8:43 PM Subject: OT:SQL Error in CF but not Access I am running a query in CF against an Access 97 database. The query runs fine directly in Access, but when I run it from CF, I get: ODBC Error Code = 07001 (Wrong number of parameters). [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. Here's the sql: SELECT DMDR_Cluster.cluster_name, DMDR_Market.market_name, DMDR_Drop_Schedule.mailpieces FROM (DMDR_Drop_Schedule left outer JOIN DMDR_Cluster ON DMDR_Drop_Schedule.id_cluster = DMDR_Cluster.id_cluster) left outer JOIN DMDR_Market ON DMDR_Drop_Schedule.id_market = DMDR_Market.id_market WHERE (((DMDR_Drop_Schedule.month)="#FORM.MomMonth#")) There are 3 tables - dmdr_cluster (id_cluster, cluster_name) dmdr_market (id_market, market_name) dmdr_drop_schedule (id_drop,id_cluster, id_market, mailpieces) Any help would be appreiciated. If you have any questions or concerns, please feel free to call me at 407-514-5021. Thank you, Issac Rosa IT - National Sales Marketing OLAP Specialist Team Leader Ofc: 407-514-5021 Cell: 407-342-0644 Fax: 407-514-5988 [EMAIL PROTECTED] -- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: Duplicate key row in object 'CDATA'?
Cameron, I could not prove it but I think that error was caused by more than one. cfapplication tag having the same client storage db but different application names. ie. cfapplication name="appone" clientmanagement="Yes" sessionmanagement="Yes" setclientcookies="Yes" clientstorage="ClientDB" cfapplication name="apptwo" clientmanagement="Yes" sessionmanagement="Yes" setclientcookies="Yes" clientstorage="ClientDB" I had the problem for a while it went away then it came back. I searched for application.cfm templates on the server. Made appropriate changes. Now it has gone away again. :o)) To expand a little bit I actually think the problem was on a separate development server in a totally different application that got attached to the same client database. Jeff Craig - Original Message - From: "Cameron Childress" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Sunday, October 29, 2000 3:37 PM Subject: RE: Duplicate key row in object 'CDATA'? I've started to get the following error in my app: --- [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'CDATA' with unique index 'id1'. As a follow up to my original post, I have found out a great deal more about the problem, though I still don't have a solution. Here's a post I just made to the Forums about it. Common CF-Talk, don't fail me now -- I've having the same error. Here's what info I can contribute... I am able to reproduce the error intermittantly using IE 5.5, but not with Netscape 4.7 (same client machine). I also have discovered a bit of code which I can comment out that makes the problem completely do away, but I have no idea why. The particular place in my app where this error occurs is when a user is logging into my app. After the login is authenticated via a CFSTOREDPROC, a whole slew of client vars are set, including one which is a WDDX packet (in case that matters). After that, a quick CFIF test is done on the resultsets of the STOREDPROC. No client vars are accessed during the execution of this CFIF, nor inside it if it returns true. If the CFIF does return true, an email is generated using CFMAIL and more of the STOREDPROC resultsets. That CFIF is the code I can comment out to make it all work. I also tried commenting out the CFMAIL (so that nothing happened if the CFIF returns true), and I can reproduce the error. Also, if I replace the CFIF with a CFOUTPUT which output the same var called in the CFIF, I can also generate the error. But yes, there's more! After the CFIF statement, the user is CFLOCATIONed to the entrance page to the app. The CFLOCATION does use ADDTOKEN="Yes", but deleting that does not prevent the error from happening. Funny thing is, that the error is not happening on the page with the CFIF, it's happening on the entry page to the app. Something in the login template (cfm page 1) is causing the entry page (cfm page 2) to fail. The offending sequence seems to be (1) call a storedproc (it returns several recordsets) (2) set a bunch or client vars using that data (3) call data from the storedproc recordset again. (4) CFLOCATION to another page. One other note here in ramblings... When you view the souce of the page, it contains the error, then a bunch of raw HTML headers (which should not show in the browser), and then the CFM page, correctly executed! So, my conclusion is... Well, I dunno really, but I can reproduce the error, and I *can* make it go away (in my app). I just don't know why. Also, I wonder why it's only happening in IE,a nd not NS? Maybe something to do with the way each browser executes the CFLOCATION? Maybe the way each stores the CFID/CFTOKEN cookies? Anyone have any ideas? -Cameron Cameron Childress ElliptIQ Inc. p.770.460.7277.232 f.770.460.0963 -- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED] Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
Re: CFSTOREDPROC and caching
I haven't verified that there is actually anything in the cached query but the debug does say (Records=1, Time=Cached Query) cfquery name="GetUser" datasource="#datasource#" cachedwithin="#CreateTimeSpan(0,1,0,0)#" exec sp_getUser @username = '#client.username#', @password = '#client.password#' /cfquery You could give it a try. Jeff Craig - Original Message - From: "Dave Watts" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, October 11, 2000 7:09 PM Subject: RE: CFSTOREDPROC and caching As far as I can tell, there are no caching attributes for CFSTOREDPROC the way there are for CFQUERY. Has anyone developed a generic tag to implement this? It should theoretically be possible to mimic CFSTOREDPROC and keep all the relevant stuff in server variables, but I don't think it's trivial, and I don't want to do it if someone else has. It's an unfortunate omission that CFSTOREDPROC doesn't support the query caching introduced in CF 4. However, if you're using a platform that supports the ODBC call syntax for executing stored procedures through the CFQUERY tag, you can call your stored procedure and have it cached: cfquery name="foo" datasource="bar" cachedwithin="#CreateTimeSpan(1,0,0,0)#" { call mysp(#mynumericparam#, '#mystringparam#') } /cfquery Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: Stored Procedures??
Check you field type. nvarchar vs varchar and ntext vs text. If the field types in your tables are nvarchar or ntext I would expect other problems. However you have your input vars defined as nvarchar in your stored procedure. @cfid nvarchar, @member_id nvarchar (50), @member_password nvarchar (10), @password_hint nvarchar (50) but are passing -- cfsqltype="CF_SQL_VARCHAR" CF is not happy with nvarchar and ntext. Jeff Craig - Original Message - From: "Bill Killillay" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, October 03, 2000 7:46 PM Subject: Stored Procedures?? Can anybody see what I am doing wrong here? I am not getting any errors, but it's not updating either. On the SQL server I have the permissions execute box checked for the dbo user (the only user in there). This same exact task works just fine if I use a standard CFQUERY instead of the method below. !--- CF Code in Question --- cfstoredproc procedure="update_member_id_and_pass" datasource="#request.maindsn#" cfprocparam type="IN" dbvarname="@cfid" value="#Client.cfid#" cfsqltype="CF_SQL_VARCHAR" cfprocparam type="IN" dbvarname="@member_id" value="#attributes.email#" cfsqltype="CF_SQL_VARCHAR" cfprocparam type="IN" dbvarname="@member_password" value="#attributes.password#" cfsqltype="CF_SQL_VARCHAR" cfprocparam type="IN" dbvarname="@password_hint" value="#attributes.pass_hint#" cfsqltype="CF_SQL_VARCHAR" /cfstoredproc !--- SQL Stored Procedure Code --- CREATE PROCEDURE update_member_id_and_pass ( @cfid nvarchar, @member_id nvarchar (50), @member_password nvarchar (10), @password_hint nvarchar (50) ) AS UPDATE member SET member_id = @member_id, member_password = @member_password, password_hint = @password_hint WHERE ( cfid = @cfid ) The syntax checker in the SQL SP builder says it's correct. Bill -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: sql question
I have to wonder why the same Users_ID would be registered for the same class 4 times(a very large person needing 4 seats??) That aside. Add an Identity field for the table. class_registration_ID. Then delete from class_registration where class_registration_ID = theIDnumber - Original Message - From: "Gavin Myers" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, September 27, 2000 1:58 PM Subject: ot: sql question here's what i'm doing delete from class_registration where users_id='123123' and class_id='4242424' here's what the table looks like name users_id class_id gavin 123123 4242424 gavin 123123 4242424 gavin 123123 4242424 gavin 123123 4242424 what i want to do is delete only 1 of those rows suggestions? thanks, Gavin -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
test
This is a multi-part message in MIME format. --=_NextPart_000_0196_01C027E4.163EE020 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable test --=_NextPart_000_0196_01C027E4.163EE020 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVFONT face=3DArial size=3D2test/FONT/DIV/BODY/HTML --=_NextPart_000_0196_01C027E4.163EE020-- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.