Loading...

qSIListForm [Type = Edit] Updating a record in a SQL Table where the Primary Key is GUID

qSIListForm [Type = Edit] Updating a record in a SQL Table where the Primary Key is GUID

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #5429
      Anonymous
      Anonymous
      Participant

      John

      If you could share the Catalog configuration string, that will be great. This XML string will actually show how the AccountID is being configured and constructed when sending over to SQLServer. If the stored procedure is expecting a GUID type parameter, the SI will construct one from, say fixed value string, or other source.

    • #4404
      Anonymous
      Anonymous
      Participant

      We are tyring to use the qSiListForm [v6.1] to update a record in a SQL table. In this case the Primary Key [AccountID] is ‘uniqueidentifier’, a GUID. When we try to pass this value from the web part to a ‘SelectByPK’ Stored Procedure we get this error.

      “The following error occurred: An error occured while connecting to database: Failed to convert parameter value from a String to a Guid”

      Is there some work around so that we can pass a ‘Sting’ to a ‘GUID’?

      Additional Attachments:

    • #5430
      Anonymous
      Anonymous
      Participant

      Hi John,

      I reproduced your issue, and I found a workaround.

      You need to manually change the XML configuration for the catalog. Change the type for the Guid parameter from "System.Data.SqlDbType.UniqueIdentifier" to "System.Data.SqlDbType.NVarChar".

      Once you do that the conversion from a String to a Guid will be done in the ADO.Net layer instead of within the QuickApps code.

      The only thing that you need to watch out for is if you try to edit that operation in ezEdit again, your configuration will get lost because the Type parameter will not be what it expects and you'll need to set it up again.

      Bill

Viewing 2 reply threads

You must be logged in to reply to this topic.