@@ -695,7 +695,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
695
695
using ( SqlConnection conn = new SqlConnection ( connectionString ) )
696
696
{
697
697
conn . Open ( ) ;
698
- using ( SqlCommand cmd = new SqlCommand ( "select employeeId, lastname, firstname from employees for xml auto" , conn ) )
698
+ using ( SqlCommand cmd = new SqlCommand ( "select employeeId, lastname, firstname from employees order by employeeId asc for xml auto" , conn ) )
699
699
{
700
700
XmlReader xr ;
701
701
using ( xr = cmd . ExecuteXmlReader ( ) )
@@ -724,7 +724,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
724
724
}
725
725
726
726
// use a big result to fill up the pipe and do a partial read
727
- cmd . CommandText = "select * from orders for xml auto" ;
727
+ cmd . CommandText = "select * from orders order by orderid asc for xml auto" ;
728
728
string errorMessage ;
729
729
using ( xr = cmd . ExecuteXmlReader ( ) )
730
730
{
@@ -768,9 +768,9 @@ private static void ExecuteXmlReaderTest(string connectionString)
768
768
769
769
// multiple results
770
770
cmd . CommandText =
771
- "select orderid from orders where orderid < 10253 for xml auto;" +
772
- "select customerid from customers where customerid < 'ANTON' for xml auto;" +
773
- "select employeeId from employees where employeeid < 3 for xml auto;" ;
771
+ "select orderid from orders where orderid < 10253 order by orderid asc for xml auto;" +
772
+ "select customerid from customers where customerid < 'ANTON' order by customerid asc for xml auto;" +
773
+ "select employeeId from employees where employeeid < 3 order by employeeid asc for xml auto;" ;
774
774
using ( xr = cmd . ExecuteXmlReader ( ) )
775
775
{
776
776
string [ ] expectedResults =
@@ -909,7 +909,7 @@ private static void SequentialAccess(string connectionString)
909
909
}
910
910
}
911
911
912
- using ( SqlCommand cmd = new SqlCommand ( "select * from employees" , conn ) )
912
+ using ( SqlCommand cmd = new SqlCommand ( "select * from employees order by EmployeeID " , conn ) )
913
913
{
914
914
// test sequential access with partial reads
915
915
using ( reader = cmd . ExecuteReader ( CommandBehavior . SequentialAccess ) )
0 commit comments