Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Datatable returns 0 rows when consuming data from Object Variable (Recordset)

$
0
0









This is crazy! I have a variable called ValidISBN and InvalidISBN (both Type Object). I have a Recordset that populates these variables in a data flow and I can see that the records comes in when look at the dataview.

ISSUE: When I fill the datatable, then count the rows, it returns 0?

Here is my code:

OleDbDataAdapter adapter = new OleDbDataAdapter();
DataTable ValidISBNDT = new DataTable();
DataTable InvalidISBNDT = new DataTable();

adapter.Fill(ValidISBNDT, Dts.Variables["User::ValidISBNTable"].Value);
adapter.Fill(InvalidISBNDT, Dts.Variables["User::InValidISBNTable"].Value);

Dts.Variables["User::ValidISBNTable"].Value = ValidISBNDT;
Dts.Variables["User::InvalidISBNTable"].Value = InvalidISBNDT;

string test = "";

test = (ValidISBNDT.Rows.Count.ToString());
MessageBox.Show(test);

test = (InvalidISBNDT.Rows.Count.ToString());
MessageBox.Show(test);

Thanks in advance!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>