I'm trying to write a stored procedure that does the BULK insert for an end user that runs a macro from an access database that calls this stored procedure (this works fine) ... I'm getting an error saying the current user does not own the object that is being used...CREATE PROCEDURE UpdateFullDirectory AS SET NOCOUNT ON CREATE TABLE #CDR (LastName VARCHAR(30), Firstname VARCHAR(30), Extension VARCHAR(30), Employee VARCHAR(30), PrintDial VARCHAR(30), DirectDial VARCHAR(30)) CREATE TABLE #TELEDIR (Employee VARCHAR(30), Last VARCHAR(30), First VARCHAR(30), Nickname VARCHAR(30), ProcessLevel VARCHAR(30), Department VARCHAR(30), Description VARCHAR(30), Miscellaneous VARCHAR(30)) BULK INSERT #CDR FROM '\\crp610\phonedirectory\cdr.txt' WITH ( FIELDTERMINATOR='\t', FIRSTROW=2 ); BULK INSERT #TELEDIR FROM '\\crp610\phonedirectory\teledir.txt' WITH ( FIELDTERMINATOR=',', FIRSTROW=1 );
help?
I'd like to use temp tables if I can ... I would suffice with real tables if need be, but I'd prefer the temp tables ... when I execute this ... I have tried it with normal tables and it still gives me this error ...Server: Msg 8104, Level 16, State 2, Procedure UpdateFullDirectory, Line 10 The current user is not the database or object owner of table '#CDR'. Cannot perform SET operation.It gives the same error if the table was named 'CDR' and in the current database ... I don't want to grant this user any rights other than executing this stored procedure ... can this be done?