Solved

inserting data into Excel sheet

Posted on 2003-11-12
1
251 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable To Access a Web Domain From Our Network 16 86
Forbidden errors 5 140
AWS New EC2 Instance and EBS Storage 2 78
Change local server setting in php 6 87
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now