@@ -701,7 +701,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
701
701
using ( SqlConnection conn = new SqlConnection ( connectionString ) )
702
702
{
703
703
conn . Open ( ) ;
704
- using ( SqlCommand cmd = new SqlCommand ( "select employeeId, lastname, firstname from employees for xml auto" , conn ) )
704
+ using ( SqlCommand cmd = new SqlCommand ( "select employeeId, lastname, firstname from employees order by employeeId asc for xml auto" , conn ) )
705
705
{
706
706
XmlReader xr ;
707
707
using ( xr = cmd . ExecuteXmlReader ( ) )
@@ -730,7 +730,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
730
730
}
731
731
732
732
// use a big result to fill up the pipe and do a partial read
733
-
8000
cmd . CommandText = "select * from orders for xml auto" ;
733
+ cmd . CommandText = "select * from orders order by orderid asc for xml auto" ;
734
734
string errorMessage ;
735
735
using ( xr = cmd . ExecuteXmlReader ( ) )
736
736
{
@@ -774,9 +774,9 @@ private static void ExecuteXmlReaderTest(string connectionString)
774
774
775
775
// multiple results
776
776
cmd . CommandText =
777
- "select orderid from orders where orderid < 10253 for xml auto;" +
778
- "select customerid from customers where customerid < 'ANTON' for xml auto;" +
779
- "select employeeId from employees where employeeid < 3 for xml auto;" ;
777
+ "select orderid from orders where orderid < 10253 order by orderid asc for xml auto;" +
778
+ "select customerid from customers where customerid < 'ANTON' order by customerid asc for xml auto;" +
779
+ "select employeeId from employees where employeeid < 3 order by employeeid asc for xml auto;" ;
780
780
using ( xr = cmd . ExecuteXmlReader ( ) )
781
781
{
782
782
string [ ] expectedResults =
@@ -915,7 +915,7 @@ private static void SequentialAccess(string connectionString)
915
915
}
916
916
}
917
917
918
- using ( SqlCommand cmd = new SqlCommand ( "select * from employees" , conn ) )
918
+ using ( SqlCommand cmd = new SqlCommand ( "select * from employees order by EmployeeID " , conn ) )
919
919
{
920
920
// test sequential access with partial reads
921
921
using ( reader = cmd . ExecuteReader ( CommandBehavior . SequentialAccess ) )
0 commit comments