Hi, I have inherited a sproc that writes out error messages to an excel file. It build up a dynamic sql command and then executes it. Inside the command is the line "SELECT * FROM [Exceptions$]" To be specific the relevent segment of Sql code is:[code="sql"] SET @varSql2 = 'INSERT INTO OPENROWSET(''Microsoft.ACE.OLEDB.12.0'', ''Excel 12.0;Database=' + @varTemplateConnectionString + ''', ''SELECT * FROM [Exceptions$]'')' + @varSql BEGIN TRY EXEC (@varSql2) [/code] Can anyone please tell me what Exception$ is please (or where is it?)? I have googled for it and got nowhere. There are no other references to it in the sproc. BTW, the main problem that I am working on is that sometimes the error messages are written to file and sometimes not and I feel that it *may* be related to this particular LOC.Any information would be most appreiated,Thanks,J.
↧