Since you are having CF do the processing and as long as Oracle is setup as the DSN this should work fine. I have been dealing with Oracle for ten years and it uses SQL just like SQL(database) does. I think you will find that when you do things using CF instead of stored procedures it will go across several platforms where if you use stored procedures it may not. One advantage to not using stored procedures but there are many advantages to using them.
Steven Lancaster WebMaster Core Laboratories 6316 Windfern Houston, TX 77040 713-328-2532 (Office) 713-328-2150 (Fax) 832-259-3010 (Cell) mailto:[EMAIL PROTECTED] http://www.corelab.com -----Original Message----- From: Douglas L. Brown [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 10:45 AM To: CF-Talk Subject: Re: insert question This is for sql, I am not real sure in regard to oracle. But the same logic. I think the problem is really in the use of the <CFIF> statements. Doug ----- Original Message ----- From: "Yager, Brian T Contractor/NCCIM" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, November 16, 2001 8:29 AM Subject: RE: insert question > Doug, > > Is this for Oracle or SQL Server (or will it work for both)? > > Brian > > -----Original Message----- > From: Douglas L. Brown [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 16, 2001 10:33 AM > To: CF-Talk > Subject: Re: insert question > > > It looks just like my create user account, take a look and hope it helps. > > <CFQUERY DATASOURCE="#application.dsn#" NAME="check_login"> > SELECT email, > password > FROM cust_contacts > WHERE email = '#email#' > AND password = '#password#' > </CFQUERY> > > <!--- CHECK TO SEE IF THE USER EXISTS IN THE DB AND IF THEY DO, REDIRECT > THEM TO > THE ERROR PAGE AND NOTIFY THEM TO LOGIN NORMALLY. //---> > > <CFIF CHECK_LOGIN.RECORDCOUNT GT 0> > <CFLOCATION URL="/index.cfm?fuseaction=error&message=1"> > <CFELSE> > > <!--- IF THE USER DOES NOT EXIST, INSERT THEM INTO THE DATABASE//---> > > <CFTRANSACTION> > <CFQUERY DATASOURCE="#application.dsn#" NAME="insert_cust_login"> > DECLARE @maxid int > BEGIN > SELECT @maxid = MAX(ID) > FROM cust_contacts > IF @maxid IS NULL > SELECT @maxid = 1 > ELSE > SELECT @maxid = @maxid + 1 > END > > INSERT INTO cust_contacts > VALUES ( '#custNum#', > @maxid, > '#f_name#', > '#l_name#', > '#email#', > '#password#' ) > </CFQUERY> > </CFTRANSACTION> > </CFIF> > > > > Doug > > > ----- Original Message ----- > From: "Jones, Becky" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Friday, November 16, 2001 5:28 AM > Subject: insert question > > > > i have a list of users that you can choose from on a form to assign to an > > application(s). > > if the user is already assigned to a certain app however, i dont want that > > user to re-insert into the database. (infact, the dbase wont let that > happen > > because of duplicate indexes) but if the second user isnt already assigned > > to the app...i do want him to insert. but it doesnt seem to be working > out. > > any ideas? > > my qryPeople is this: > > <CFIF USERS NEQ "No Users"> > > <cfquery name="qryPeople" datasource="#dsn#"> > > SELECT * > > FROM qryAppToEmp2 > > WHERE UserID IN (#form.Users#) > > AND AppID IN (#form.appID#) > > </cfquery> > > </cfif> > > my insert: > > <cfif isdefined("qryPeople.recordcount") AND qryPeople.RecordCount IS 0 OR > > qryPeople.UserID neq "No Users"> > > <cfloop list="#form.Users#" index="i" delimiters=","> > > <cfloop list="#form.appid#" index="p" delimiters=","> > > <cfquery datasource="#dsn#" name="addUser"> > > INSERT INTO tblAppIAUsers > > ( > > AppID, > > Listing_ID > > > > ) > > VALUES > > ( > > > > #p#, > > #i# > > ) > > </cfquery> > > </cfloop> > > </cfloop> > > </cfif> > > > > > > ************************************************* > > This e-mail, including any attachments, is intended for the > > receipt and use by the intended addressee(s), and may contain > > confidential and privileged information. If you are not an intended > > recipient of this e-mail, you are hereby notified that any unauthorized > > use or distribution of this e-mail is strictly prohibited. > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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