Skip to content

Commit

Permalink
Edits
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra committed Dec 24, 2019
1 parent 7a61da6 commit 84ad70d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ internal void Append(SqlCommand command)
if (null != byteValues)
{
int offset = p.Offset;
int size = p.GetActualSize();
int size = p.Size;
int countOfBytes = byteValues.Length - offset;
if ((0 != size) && (size < countOfBytes))
if ((size > 0) && (size < countOfBytes))
{
countOfBytes = size;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ internal void Append(SqlCommand command)
if (null != byteValues)
{
int offset = p.Offset;
int size = p.GetActualSize();
int size = p.Size;
int countOfBytes = byteValues.Length - offset;
if ((0 != size) && (size < countOfBytes))
if ((size > 0) && (size < countOfBytes))
{
countOfBytes = size;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class SqlCommandSetTest
[CheckConnStrSetupFact]
public void TestByteArrayParameters()
{
string tableName = DataTestUtility.GetUniqueName("CMD");
string procName = DataTestUtility.GetUniqueName("CMD");
string tableName = DataTestUtility.GetUniqueNameForSqlServer("CMD");
string procName = DataTestUtility.GetUniqueNameForSqlServer("CMD");
byte[] bArray = new byte[] { 1, 2, 3 };

using (var connection = new SqlConnection(DataTestUtility.TCPConnectionString))
Expand Down

0 comments on commit 84ad70d

Please sign in to comment.