Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Romand 14 posts 154 karma points
    Dec 12, 2016 @ 10:32
    Romand
    0

    NewsletterStudio, SendNewsletterService: Conversion failed

    While trying to set up a dynamic subscription provider I encouter following error. My best guess is that property DataProviderKey is casted to int, but failed because of its value.

    What is the purpose of DataProviderKey. Should it be unique ?

    Thanks for your answer,

    This newsletter has the status error, something probably went wrong during the send out 
    
    Error message:
     NewsletterStudio, SendNewsletterService: Conversion failed when converting the nvarchar value '6648f79b-9f17-4e07-9350-8528e8ce5e94' to data type int. : at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at NewsletterStudio.Infrastucture.Data.PetaPoco.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) at NewsletterStudio.Infrastucture.Data.PPDatabaseAdaptor.Insert(String tableName, String primaryKeyName, Object obj) at NewsletterStudio.Infrastucture.Data.EmailTrackingItemRepository.Save(EmailTrackingItem emailTrackingItem) at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems() at NewsletterStudio.Services.SendNewsletterService.SendEmails()
    
    You can try to continue to send the newsletter by going to the "Send options" and follow the instructions. 
    
  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Dec 12, 2016 @ 14:01
    Markus Johansson
    100

    Hi!

    The "data provider key" is used to locate a mailing list within the Subscription Provider. The two providers that we ship with the package are both storing int's but after looking at this it turns out that all the code works with string but when a letter is about to be sent the "EmaiTrackingItems" are created, during this it tries to store the DataProviderKey as a INT in the table ns_EmaiTrackingItems.

    You could try to just change the datatype of that column to string - it might "just work". I will post this as a bug that will be fixed in upcoming releases.

    // m

  • Romand 14 posts 154 karma points
    Dec 12, 2016 @ 15:46
    Romand
    0

    Thanks for this anwser. I'll try to change the column type as explained.

  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Dec 12, 2016 @ 16:12
    Markus Johansson
    0

    Great! Let me know how that works =D

  • Romand 14 posts 154 karma points
    Dec 12, 2016 @ 19:46
    Romand
    0

    First test went well. SubscriberId received correct value and mail got sent. Unsubsription and links cliked all followed. To me no problems in changing the column type. Thanks for you help.

  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Dec 12, 2016 @ 19:52
    Markus Johansson
    0

    Nice!

    Thanks for sharing your experiance - I'll give it some testing as well and change this in upcoming releases.

Please Sign in or register to post replies

Write your reply to:

Draft