Solved

inserting data into Excel sheet

Posted on 2003-11-12
1
254 Views
Last Modified: 2013-12-24
I am using the following code:

<cfquery datasource="wrightLive" name="getStaff">
SELECT FirstName, LastName, StaffID FROM staff
order by FirstName
</cfquery>

<cfoutput query="getStaff">
       <cfquery datasource="staffstuff">
       INSERT INTO "sheet1$" (
            FirstName,
            LastName,
            StaffID
            )
            VALUES (
            '#getStaff.FirstName#',
            '#getStaff.LastName#',
            #getStaff.StaffID#
            )
       </cfquery>
 </cfoutput>

When I try to run it, I get an error that says, "Operation must use an updateable query".  I have checked that I have permission to write to the Excel file, but beyond that I don't know what else to check!  Help...
0
Comment
Question by:theamzngq
1 Comment
 
LVL 17

Accepted Solution

by:
anandkp earned 200 total points
ID: 9737195
I suppose u have created a DSN for the excel sheet !

make sure - u have UNChecked the "Maintain Connections" under advanced settings of ur ODBC socket DataSources in CFADMIN.

below that u will find options for Allow SQL for "insert" / "update" etc
chk the ones u need

& try again !

let me know

K'Rgds
Anand
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question