473,549 Members | 2,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error 7874 using global temp table

I have a stored procedure that is loading data into a global temp table.
Here is all the code for that stored procedure.





If EXISTS (Select * FROM Tempdb.dbo.syso bjects WHERE name =
"##TempPMValues ")
Drop Table [##TempPMValues]

CREATE TABLE [##TempPMValues] (
[Monitor] [varchar] (20) NULL ,
[Coverage Area] [varchar] (20) NULL ,
[Service Co] [varchar] (20) NULL ,
[BranchSiteCode] [varchar] (20) NULL ,
[BankName] [varchar] (50) NULL ,
[BankAddress] [varchar] (50) NULL ,
[BankCity] [varchar] (30) NULL ,
[BankState] [char] (2) NULL ,
[BankZip] [varchar] (15) NULL ,
[DateInstalled] [datetime] NULL ,
[PM Type] [varchar] (15) NULL ,
[Last PM Date] [datetime] NULL ,
[Next PM Scheduled] [datetime] NULL

INSERT INTO ##TempPMValues SELECT * FROM PMLog ORDER BY [Coverage Area],
[Next PM Scheduled]

I am using DoCmd.TransferS preadsheet to put the temp table data into a
spreadsheet. Here is that code.

DoCmd.TransferS preadsheet acExport, 8, "##TempPMValues ", sFileName

When this line executes, I see "Error 7874. Microsoft Access can't find the
object '##TempPMValues .'

I have tried both "dbo.##TempPMVa lues" and "tempdb.##TempP MValues" in the
TransferSpreads heet action. I can use "Select * from ##TempPMValues" in
query analyzer and the temp table does exist.

How can I use a global temp table in TransferSpreads heet?


Nov 12 '05 #1
0 2580

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Alex Vorobiev | last post by:
hi there, i am using sql server 7. below is the stored procedure that is giving me grief. its purpose it two-fold, depending on how it is called: either to return a pageset (based on page number and page size), or to return IDs of previous and next records (based on current record id). the problem is, that the order in which records are...
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
by: Alf P. Steinbach | last post by:
// As usual the error message directs one to the report the bug. // // And as usual there is absolutely no way to do so without paying for // the privilege... // // Or using three or four hours to find the _current_ reporting page... // // Since I'm now using much time on reporting this compiler bug, please // do also fix the __LINE__...
by: pukivruki | last post by:
hi, I wish to create a temporary table who's name is dynamic based on the argument. ALTER PROCEDURE . @PID1 VARCHAR(50), @PID2 VARCHAR(50), @TICKET VARCHAR(20)
by: crazy_jutt | last post by:
hi, anyone knows if i can create index on global temp tables if yes, will i use session schema for indexes also ? if yes, can i create all kinds like unique, clustered, mdc etc indexes in global temp table ? please direct me to some web resource where i can find what all i can do and i cannot do with global temp tables
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An...
by: Rahul B | last post by:
Hi, I have very little knowledge about creating Procedures/functions in DB2. When i tried to create the test function like CREATE FUNCTION GET_TEST (P_TEST_ID INTEGER, P_SEL_OR_SORT INTEGER,
by: Sami Ward | last post by:
I have an an MSAccess data project front end linked to an SQL Server Database. I keep getting Error number 7874: database cannot find the object tblname when I look however the table is there. I am calling a procedure which deletes all records in the table and then repopultates it with new records. so the table is never deleted and...
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114....
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.