Hey,
Here's what I did to work around the problem and why I think it is the fault of the SqlHelper function:
The first code snippet is the original function using the SqlHelper and the second function is what I did to work around the problem
The version that didn't work:
public override void AddPaymentInfo(int portalID, int userID, int orderID, byte[] creditCardNumber, byte[] creditCardVerificationCode,
byte[] creditCardExpirationMonth, byte[] creditCardExpirationYear)
{
SqlHelper.ExecuteNonQuery(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_PaymentInfo_AddPaymentInfo",
portalID,orderID,userID,creditCardNumber,creditCardVerificationCode,creditCardExpirationMonth,creditCardExpirationYear);
}
The version that worked:
public override void AddPaymentInfo(int portalID, int userID, int orderID, byte[] creditCardNumber, byte[] creditCardVerificationCode,
byte[] creditCardExpirationMonth, byte[] creditCardExpirationYear)
{
SqlConnection connection = new SqlConnection(ConnectionString);
connection.Open();
string commandText = DatabaseOwner + ObjectQualifier + "Store_PaymentInfo_AddPaymentInfo";
SqlCommand command = new SqlCommand(commandText, connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("PortalID",portalID);
command.Parameters.AddWithValue("UserID", userID);
command.Parameters.AddWithValue("OrderID", orderID);
command.Parameters.AddWithValue("CreditCardNumber", creditCardNumber);
command.Parameters.AddWithValue("CreditCardVerificationCode", creditCardVerificationCode);
command.Parameters.AddWithValue("CreditCardExpirationMonth", creditCardExpirationMonth);
command.Parameters.AddWithValue("CreditCardExpirationYear", creditCardExpirationYear);
//SqlHelper.ExecuteNonQuery(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_PaymentInfo_AddPaymentInfo",
// portalID,orderID,userID,creditCardNumber,creditCardVerificationCode,creditCardExpirationMonth,creditCardExpirationYear);
command.ExecuteNonQuery();
connection.Close();
}