Drop and Recreate Excel table
I'm having a heck of a time trying to upload data to an excel spreadsheet. This works perfectly in sql 2000 but I've been having problems with 2005 SSIS package "Package1.dtsx" starting.Error: 0xC002F210 at Drop table(s) SQL Task, Execute SQL Task: Executing the query "drop table `GRE`" failed with the following error: "Table 'xxx' does not exist.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Drop table(s) SQL TaskError: 0xC002F210 at Preparation SQL Task, Execute SQL Task: Executing the query "CREATE TABLE `xxx` (`TEST_REC_NBR` Decimal(29,0),`PROCESS_DT_GRE` LongText)" failed with the following error: "Invalid precision for decimal data type.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Preparation SQL TaskSSIS package "Package1.dtsx" finished: Failure.
May 30th, 2006 10:27pm

It looks like the problem is Decimal (29,0) -seems it is not a valid precision for excel. I tried a create table statement with Decimal (28,0) and it succeeded while Decimal(29,0) gave the same error. I think the maximum precision Excel supports for Decimal is 28.
Free Windows Admin Tool Kit Click here and download it now
May 31st, 2006 2:47am

This is the output when I choose create and drop the table AND when I try to delete the rows. I've changed the field to decimal(28,0) also. I can get around the problem by using a file system task and removing the file. This will work for what I'm doing but what if I need to delete only certain rows? - Validating (Error) Messages Error 0xc001000e: {5143E747-D851-4E0F-9335-CCBF5E66371E}: The connection "DestinationConnectionOLEDB" is not found. This error is thrown by Connections collection when the specific connection element is not found. (SQL Server Import and Export Wizard) Error 0xc001000e: {5143E747-D851-4E0F-9335-CCBF5E66371E}: The connection "DestinationConnectionOLEDB" is not found. This error is thrown by Connections collection when the specific connection element is not found. (SQL Server Import and Export Wizard) Error 0xc00291eb: Drop table(s) SQL Task: Connection manager "DestinationConnectionOLEDB" does not exist. (SQL Server Import and Export Wizard) Error 0xc0024107: Drop table(s) SQL Task: There were errors during task validation. (SQL Server Import and Export Wizard)
May 31st, 2006 5:28am

I think you have hit a bug in Import Export Wizard, where the connection for the Execute SQL Task which drops the tableis set incorrectly. I will investigate further.
Free Windows Admin Tool Kit Click here and download it now
May 31st, 2006 11:59pm

Ranjeeta wrote: I think you have hit a bug in Import Export Wizard, where the connection for the Execute SQL Task which drops the tableis set incorrectly. I will investigate further. I am having troubledeleting Excel 2007 sheets programmatically. In the earlier versions of Excel, I used to openanADO connectionand executed some code like below strSQL = "DROP TABLENameOfExcelSheet;" objCommand = New OleDb.OleDbCommand(strSQL, cnn) objCommand.ExecuteNonQuery() By executing the above code I could delete the sheet I wantedfrom an Excel workbook. But this method does NOT work with Excel 2007. How can I programmatically delete sheets from an Excel 2007 workbook?
March 11th, 2007 4:21am

Sorry...please ignore my previous comments and question. strSQL = "DROP TABLENameOfExcelSheet;" only clears the contects of an Excel sheet and does not delete the sheet itself on all versions of Excel.
Free Windows Admin Tool Kit Click here and download it now
March 13th, 2007 4:24am

Hi Ranjeeta. Did you ever find a solution for this? I am having the exact same problem.
March 17th, 2008 5:55am

Ali Gullen wrote: Sorry...please ignore my previous comments and question. strSQL = "DROP TABLENameOfExcelSheet;" only clears the contects of an Excel sheet and does not delete the sheet itself on all versions of Excel.try this: DROP TABLE [NameOfExcelSheet$]hth
Free Windows Admin Tool Kit Click here and download it now
March 17th, 2008 10:38am

I tried this but it still did not delete the worksheet from the excel file although my Execute SQL Task completed successfully. Any other suggestions please? I'm using Excel 2007 with SSIS 2008.
May 28th, 2010 9:50pm

try this: drop table `NameofExcelsheet` GO
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2010 6:54am

Hey Ali Gullen, Did you solve the issue of OLEDB clearing the data and not deleting the sheet ? Any Pointers / Help appreciated. Thanks,
May 19th, 2011 12:11am

Hey Ali Gullen, Did you solve the issue of OLEDB clearing the data and not deleting the sheet ? Any Pointers / Help appreciated. Thanks,
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 12:12am

Hey Ali Gullen, Did you solve the issue of OLEDB clearing the data and not deleting the sheet ? Any Pointers / Help appreciated. Thanks,
May 19th, 2011 7:09am

Hey Ali Gullen, Did you solve the issue of OLEDB clearing the data and not deleting the sheet ? Any Pointers / Help appreciated. Thanks,
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 7:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics