T
Trapulo
I've a simple .NET 3.5 / ASP.NET application that runs well on development
server (Win 2008 x64) and with strange behavor in production (Win 2003 x86).
Basically this procedure gets some rows from a stored procedure (SQL
Server). A row has two coloms: an ID (int32) and a text.
The procedure may process every row and create a string with all text fields
values concatenates, using a standard stringbuilder. Very simple. This is
core code:
Dim data As DataTable = GetData()
Dim output As New Text.StringBuilder
For Each r As DataRow In data .Rows
output .Append(CStr(r("TextField")).Trim)
output .Append(" "c)
Next
result = output.ToString
In production, every time I have more than 25 output rows, I have this
sequence in output string:
- data from row #1
- data from row #26
- data from row #2
- data from rows #3....#25
- data from rows #27....
Some other times it's similar, but instead of having in second position
always the row #26, I have the last but one of original data.
So, if my sql output was:
1 A
2 B
3 C
......
24 D
25 E
26 F
28 G
in development I have an output like ABC....DEFG....
and in production I have AFBC...DEG...
Same datbases, same code!
The problem occurs either I run the procedure from ASP.NET, that from a
dummy console application I can write to run it as test.
I've tested via SQL Profiler and query analyzer that production and
development SQL Servers are returning same data: same row number, same ID,
same text fields. The problem is in .NET code, but it's so strange!
anyone can help me?
server (Win 2008 x64) and with strange behavor in production (Win 2003 x86).
Basically this procedure gets some rows from a stored procedure (SQL
Server). A row has two coloms: an ID (int32) and a text.
The procedure may process every row and create a string with all text fields
values concatenates, using a standard stringbuilder. Very simple. This is
core code:
Dim data As DataTable = GetData()
Dim output As New Text.StringBuilder
For Each r As DataRow In data .Rows
output .Append(CStr(r("TextField")).Trim)
output .Append(" "c)
Next
result = output.ToString
In production, every time I have more than 25 output rows, I have this
sequence in output string:
- data from row #1
- data from row #26
- data from row #2
- data from rows #3....#25
- data from rows #27....
Some other times it's similar, but instead of having in second position
always the row #26, I have the last but one of original data.
So, if my sql output was:
1 A
2 B
3 C
......
24 D
25 E
26 F
28 G
in development I have an output like ABC....DEFG....
and in production I have AFBC...DEG...
Same datbases, same code!
The problem occurs either I run the procedure from ASP.NET, that from a
dummy console application I can write to run it as test.
I've tested via SQL Profiler and query analyzer that production and
development SQL Servers are returning same data: same row number, same ID,
same text fields. The problem is in .NET code, but it's so strange!
anyone can help me?