tag:blogger.com,1999:blog-2379842053067321961.post4231070445506594954..comments2024-03-28T00:20:58.143-07:00Comments on Welcome To TechBrothersIT: How to create Excel File Dynamically for Stored Procedure Results in SSIS Package by using Script Task - SSIS TutorialAamir Shahzadhttp://www.blogger.com/profile/16777994869678463807noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-2379842053067321961.post-51052877763890756782022-02-10T10:52:38.134-08:002022-02-10T10:52:38.134-08:00I thing when you create the 'FolderPath' v...I thing when you create the 'FolderPath' variable , you should put a '\' in end of the value string.Anonymoushttps://www.blogger.com/profile/04381172679902224041noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-11746565691422177522021-12-06T06:28:27.082-08:002021-12-06T06:28:27.082-08:00I am getting the same error. Where you able to fix...I am getting the same error. Where you able to fix it?RodgerDJrhttps://www.blogger.com/profile/15519306887965215783noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-87286340466936262462021-12-06T06:27:24.381-08:002021-12-06T06:27:24.381-08:00I am getting an error with the following line. I ...I am getting an error with the following line. I stepped through the code and this is the line that threw the error. <br /><br />adapter.Fill(ds);<br /><br /><br />Here is what I have in the error log.<br />System.InvalidOperationException: Fill: SelectCommand.Connection property has not been initialized.<br /><br /> at System.Data.Common.DbDataAdapter.GetConnection3(DbDataAdapter adapter, IDbCommand command, String method)<br /><br /> at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /><br /> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /><br /> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br /><br /> at ST_9ea14ce8a4ac4b5d8e98b991a3e93588.ScriptMain.Main() in C:\Users\rgd\AppData\Local\Temp\Vsta\32133da67d6a4854aec67e3324183b76\ScriptMain.cs:line 126<br /><br />Any ideas what I did wrong?<br /><br />RodgerDJrhttps://www.blogger.com/profile/15519306887965215783noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-4158148097595908782021-08-24T04:47:30.424-07:002021-08-24T04:47:30.424-07:00I had trouble exporting the results to excel becau...I had trouble exporting the results to excel because of single quotes in my output so I modified the code to handle single quotes.<br /><br />int index = table.Rows.IndexOf(row);<br />var columnValue = table.Rows[index].ItemArray[i].ToString();<br />if (table.Rows[index].ItemArray[i].ToString().Contains("'"))<br />{<br /> columnValue = columnValue.Replace("'", "''");<br />}<br />columnvalues += "'" + columnValue + "',";Anonymoushttps://www.blogger.com/profile/12264956686742868406noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-70120751186926384322021-07-28T11:37:31.833-07:002021-07-28T11:37:31.833-07:00I am newer to this and tried to perform this and g...I am newer to this and tried to perform this and get the following error:<br />System.InvalidOperationException: Fill: SelectCommand.Connection property has not been initialized.<br /> at System.Data.Common.DbDataAdapter.GetConnection3(DbDataAdapter adapter, IDbCommand command, String method)<br /> at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br /> at ST_b9b0ce053b4249359fdbd25b9a37dfbf.ScriptMain.Main()<br />Anonymoushttps://www.blogger.com/profile/01951071216408803790noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-24507313996876139212019-10-03T04:17:49.865-07:002019-10-03T04:17:49.865-07:00Hi,
How to run the Stored procedure with passing p...Hi,<br />How to run the Stored procedure with passing parametersenthilhttps://www.blogger.com/profile/08470898583388317111noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-78188662574706343892019-09-27T01:51:39.874-07:002019-09-27T01:51:39.874-07:00Great tutorial, but I am having timeout error in s...Great tutorial, but I am having timeout error in script task, running SP that runs for 6min, but it stops after 30s I tried adding this line to script, but it did not work.<br />DataSet ds = new DataSet();<br /> adapter.Fill(ds);<br /> adapter.SelectCommand.CommandTimeout = 1800;<br />Do you know how to upgrade this script to not have timeout errorAnonymoushttps://www.blogger.com/profile/04233289210711135062noreply@blogger.comtag:blogger.com,1999:blog-2379842053067321961.post-34929680803457581552019-02-13T18:30:08.531-08:002019-02-13T18:30:08.531-08:00great article, having trouble creating multiple wo...great article, having trouble creating multiple worksheets with multiple stored procedures. What if I have another stored procedure and want to add the results to the same workbook but in a different sheet. Website Design Survival Kithttps://www.blogger.com/profile/07173297538000192264noreply@blogger.com