Next Page

1

Previous Page

Thread: Insert Multiple Records Using Cold Fusion with Oracle Database

Created on: 07/22/09 07:43 AM

Replies: 0

ramskrishna


Member


Joined: 06/11/09

Posts: 31

Insert Multiple Records Using Cold Fusion with Oracle Database
07/22/09 7:43 AM

Hello All,

How to Insert Multiple Records Using Cold Fusion with Oracle Database in Soundings.

i was tried like this its not working, please check it once if i am doing any thing wrong.

<cfloop index="x" from="1" to="3">
<cfset newInsID = "#x#">
<cfquery name="addAnswer" datasource="mydsnnew">
insert into newanswers(id, questionid, answer, rank)
values('#newInsID#','345663','ARK1','1')
</cfquery>
</cfloop>

my oracle table is :

CREATE TABLE NEWANSWERS
(
ID VARCHAR2(35 BYTE) NOT NULL,
QUESTIONID VARCHAR2(35 BYTE) NOT NULL,
ANSWER VARCHAR2(255 BYTE) NOT NULL,
RANK NUMBER(1, 0) DEFAULT 0
)

i tried like this, its inserting only one record in oracle database table.

i want to insert all the records into my Oracle Database Table.


Thanks
ARK

Link | Top | Bottom

Next Page

1

Previous Page

New Post

Please login to post a response.