Ask a Question related to Coldfusion Database Access, Design and Development.
-
QueenBee #1
Oracle error=917 when trying to insert into database
I get the following error when I try to insert into table -
Oracle Error Code = 917
ORA-00917: missing comma
SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, REMOVE_CHANGES,
COMMENTS) VALUES ('Danna Sturdivant', '978/659-3738',
'Danna.Sturdivant@philips.com', 'WINTEL', 'Mike Conroy',
'http://www.wwww.wwww.wwww.com', 'Add new content to web site', 'change section
2 to say - this is modified', 'Remove section 3', '{d '2006-05-01'}', 'No', '{d
'2006-06-01'}', 'This is a test')"
Any ideas? :confused;
<cfparam name="session.isscwebrequest" default="">
<cfparam name="form.content_section" default="">
<cfparam name="form.content_section" default="">
<cfparam name="form.urlchange" default="">
<cfparam name="form.newcontent" default="">
<cfparam name="form.modify_content" default="">
<cfparam name="form.remove_content" default="">
<cfparam name="form.modify_date" default="">
<cfparam name="form.changes_remain" default="">
<cfparam name="form.remove_changes" default="">
<cfparam name="form.comments" default="">
<cfset requestor = #session.stcUserInfo.userfname# &' '&
#session.stcUserInfo.userlname#>
<!--- can't put cf function is query statement. Setting variables to
accomodate date values. --->
<cfset modifydate = #createODBCDate(modify_date)#>
<cfif remove_changes is not "">
<cfset removechanges = #createODBCDate(remove_changes)#>
<cfelse>
<cfset removechanges = "">
</cfif>
<title>ISSC Web Request - Process Page</title>
<cftransaction>
<cfquery name="insert_request" datasource="#client.oracledsn#"
username="#client.oracleuser#" password="#client.oraclepass#">
INSERT INTO
ISSCWEB_REQUEST
(REQUESTOR_NAME,
REQUESTOR_PHONE,
REQUESTOR_EMAIL,
CONTENT_SECTION,
CONTENT_OWNER,
URL_CHANGE,
NEW_CONTENT,
MODIFY_CONTENT,
REMOVE_CONTENT,
MODIFY_DATE,
CHANGES_REMAIN,
REMOVE_CHANGES,
COMMENTS)
VALUES
('#requestor#',
'#session.stcUserInfo.userphone#',
'#session.stcUserInfo.useremail#',
'#content_section#',
'#contentowner#',
'#urlchange#',
'#newcontent#',
'#modify_content#',
'#remove_content#',
'#modifydate#',
'#changes_remain#',
'#removechanges#',
'#comments#')
</cfquery>
<CFQUERY name="getRequestID" datasource="#client.oracledsn#"
username="#client.oracleuser#" password="#client.oraclepass#">
SELECT MAX(ISSCWEB_ID) as ISSC_ID
FROM ISSCWEB_REQUEST
</CFQUERY>
</cftransaction>
<!--- send email confirmation --->
<!--- cc="#form.contentowneremail#" --->
<cfmail from="Change-Mgmt.PMS-IT@philips.com"
to="#session.stcUserInfo.useremail#"
cc="Change-Mgmt.PMS-IT@philips.com"
bcc="infrastructure.admin@philips.com"
subject="ISSC Web Content Change Request - #getRequestID.ISSCID# --
TESTING"
type="HTML">
This is the confirmation for your request <strong>REQUEST ID</strong>.<br><br>
For status updates, please <strong>REPLY TO ALL</strong> on this request.<br>
<hr>
<br>
#session.isscwebrequest#
</cfmail>
<!--- end send email --->
<!--- go to confirmation page --->
<cflocation url="isscweb_confirm.cfm?requestid=#getrequestid.i sscid#"
addtoken="no">
QueenBee Guest
-
Database Insert Error
:confused; I am inserting data into three tables, and the insert statements have a similar format but I get an error saying that I am Missing... -
Insert to Access database error*** Please Help
When trying to insert into access database with a form created by the standard MX2004 Insert and form wizard, get the "Syntax " error as below. Line... -
Insert into database error
I get the following error when I load this page. ODBC Error Code = 37000 (Syntax error or access violation) Missing semicolon (;) at end of SQL... -
How to INSERT XML data into Oracle database
Hi, Working on a solution where we are using XML as a means to export and import various data. Are Using ADO to save to (export ) XML using... -
Dump Database / Porting Database to Oracle
Hi, I do not know much about informix. I have no running instance here, but its my job to transfer data from informix to oracle. - Is there a... -
paross1 #2
Re: Oracle error=917 when trying to insert into database
You have a comment that states <!--- can't put cf function is query
statement.... Why not? I do it all of the time. Also, I don't think that you
want to enclose your date values in single quotes.
Phil
paross1 Guest
-
QueenBee #3
Re: Oracle error=917 when trying to insert into database
I was having other errors, that's why i have the variables set at the top. I
removed the quotes from the dates. Now I get the following error:
ORA-00911: invalid character
SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, REMOVE_CHANGES,
COMMENTS) VALUES ('Danna Sturdivant', '978/659-3738',
'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
'aosidufpu', 'apsiofdau', 'apsdifao', {d '2006-04-01'}, 'No', {d '2006-06-01'},
'eraspdiursae')"
<cfquery name="insert_request" datasource="#client.oracledsn#"
username="#client.oracleuser#" password="#client.oraclepass#">
INSERT INTO
ISSCWEB_REQUEST
(REQUESTOR_NAME,
REQUESTOR_PHONE,
REQUESTOR_EMAIL,
CONTENT_SECTION,
CONTENT_OWNER,
URL_CHANGE,
NEW_CONTENT,
MODIFY_CONTENT,
REMOVE_CONTENT,
MODIFY_DATE,
CHANGES_REMAIN,
REMOVE_CHANGES,
COMMENTS)
VALUES
('#requestor#',
'#session.stcUserInfo.userphone#',
'#session.stcUserInfo.useremail#',
'#content_section#',
'#contentowner#',
'#urlchange#',
'#newcontent#',
'#modify_content#',
'#remove_content#',
#createODBCDate(modify_date)#,
'#changes_remain#',
#createODBCDate(remove_changes)#,
'#comments#')
</cfquery>
QueenBee Guest
-
Dan Bracuk #4
Re: Oracle error=917 when trying to insert into database
Nothing is obviously wrong. My suggestion is to comment out all the fields
except the first one and try to run it. Then un-comment the fields one at a
time until it crashes. Then you'll at least know what field it was.
Dan Bracuk Guest
-
QueenBee #5
Re: Oracle error=917 when trying to insert into database
I've narrowed it down to the date fields that is doesn't like. Everything else will insert just fine.
Any other ideas?
QueenBee Guest
-
JMGibson3 #6
Re: Oracle error=917 when trying to insert into database
It depends on your exact Driver/Oracle Version/Connection environment and I
haven't done it in many years, but I do recall updating dates succesfully with
DD-MMM-YY syntax and no quotes. Oracle seemed to like that just fine. I'd
give about an 80% chance that SET myDate = 35-JUL-06 will work for you.
JMGibson3 Guest
-
QueenBee #7
Re: Oracle error=917 when trying to insert into database
1) If I put #dateformat(modify_date,'dd-mmm-yy')# - I get error :
Oracle Error Code = 984
ORA-00984: column not allowed here
SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, COMMENTS,
ISSCWEB_ID) VALUES ('Danna Sturdivant', '978/659-3738',
'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
'aosidufpu', 'apsiofdau', 'apsdifao', 01-Apr-06, 'No', 'eraspdiursae',
ISSC_WEB_SEQ.Nextval)"
2) If I put #createODBCDate(modify_date)# - I get:
ORA-00911: invalid character
SQL = "INSERT INTO ISSCWEB_REQUEST (REQUESTOR_NAME, REQUESTOR_PHONE,
REQUESTOR_EMAIL, CONTENT_SECTION, CONTENT_OWNER, URL_CHANGE, NEW_CONTENT,
MODIFY_CONTENT, REMOVE_CONTENT, MODIFY_DATE, CHANGES_REMAIN, COMMENTS,
ISSCWEB_ID) VALUES ('Danna Sturdivant', '978/659-3738',
'Danna.Sturdivant@philips.com', 'EUC', 'Dan Lawrence', 'l;kjlkjsxdljl',
'aosidufpu', 'apsiofdau', 'apsdifao', {d '2006-04-01'}, 'No', 'eraspdiursae',
ISSC_WEB_SEQ.Nextval)"
QueenBee Guest
-
QueenBee #8
Re: Oracle error=917 when trying to insert into database
I fixed the problem - instead of using CreateODBCDate(modify_date), I used
'#dateformat(modify_date,'dd-mmm-yyyy')# -- this is using the format that
ORACLE likes and that solved the issue.
Thanks to all who responded!
QueenBee Guest



Reply With Quote

