Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

inserting data into Excel sheet

Posted on 2003-11-12
1
Medium Priority
?
259 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:David Williamson
1 Comment
 
LVL 17

Accepted Solution

by:
anandkp earned 600 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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…
What You Need to Know when Searching for a Webhost Provider
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

877 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