10000 Add data ordering to queries · dotnet/SqlClient@7e2dc88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e2dc88

Browse files
MichelZbenrr101
authored andcommitted
Add data ordering to queries
1 parent 0b106c5 commit 7e2dc88

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
701701
using (SqlConnection conn = new SqlConnection(connectionString))
702702
{
703703
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))
705705
{
706706
XmlReader xr;
707707
using (xr = cmd.ExecuteXmlReader())
@@ -730,7 +730,7 @@ private static void ExecuteXmlReaderTest(string connectionString)
730730
}
731731

732732
// 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";
734734
string errorMessage;
735735
using (xr = cmd.ExecuteXmlReader())
736736
{
@@ -774,9 +774,9 @@ private static void ExecuteXmlReaderTest(string connectionString)
774774

775775
// multiple results
776776
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;";
780780
using (xr = cmd.ExecuteXmlReader())
781781
{
782782
string[] expectedResults =
@@ -915,7 +915,7 @@ private static void SequentialAccess(string connectionString)
915915
}
916916
}
917917

918-
using (SqlCommand cmd = new SqlCommand("select * from employees", conn))
918+
using (SqlCommand cmd = new SqlCommand("select * from employees order by EmployeeID", conn))
919919
{
920920
// test sequential access with partial reads
921921
using (reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess))

0 commit comments

Comments
 (0)
0