I am currently working on a custom DTS package through .NET from MySQL to MSSQL. I have created some queries that are supposed to pull back all results from certain tables and dump those results into the corresponding tables in MSSQL. The problem is, on some tables, I am only getting back 1870 rows, when there are in fact a lot more. Other tables, I get back the full amount.
By simple queries I mean something as simple as:
SELECT * from users
the record count of the returned object is 1870, when in fact there are 1944 in this instance.
If I run this same query directly in MySQL it pulls the expected results.
I am using an object of type MySqlCommand to open an object of type MySqlTable like this:
Code: Select all
MySqlConnection mysql = new MySqlConnection(connStr);
string query="SELECT * FROM users";
mysql.Open();
MySqlCommand cmd = new MySqlCommand(query.ToString());
MySqlDataTable rs = new MySqlDataTable(cmd, mysql);
MessageBox.Show(rs.RecordCount.ToString()); //result is 1870 - result from MySQL query analyzer is 1944
Is there something I am doing wrong? I cannot use the objects to dynamically build the statement, as the statement will be imported from another location so the DTS package is modifiable.
If there is another way to run a query as a string that returns the right record count, please advise.
Thanks in advance