Regarding selecting multiple columns to Object variable data type
I am selecting two rows in a sql script and storing them in an object datatype: select col1, col2 from ... ---> ResultSet: User:MyColumns - Object Now in an execute script, I pass this object variable, I want to use the data that is in there. I know when I return only 1 column, I can do the following: DataTable dt = new DataTable(); DataSet ds = new DataSet(); ds = Dts.Variables["SourceColumns"].Value as DataSet; dt = ds.Tables[0]; List<string> sourceColumns = new List<string>(); foreach (DataRow dr in dt.Rows) { sourceColumns.Add(dr[0].ToString()); } But how do I access the second paired column in my c# script now? ie. Can someone help me modify my C# script so that I can access the second paired column (col2) along with col1. thanks You are so wise...like a miniature budha covered in fur. -Anchorman
November 10th, 2010 2:40am

why you did it with script? you can simply use an oledb source and connect it to RecordSet Destination and set the object type variable in recordset destination and map columns. That's all.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 3:21am

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

Other recent topics Other recent topics