Hi,
i'm using a WHDG to update rows in the database (aspx file is attached).
When the database update is executed this exception occurs:
[SqlException (0x80131904): Die implizite Konvertierung vom sql_variant-Datentyp in uniqueidentifier ist nicht zulässig. Verwenden Sie die CONVERT-Funktion, um diese Abfrage auszuführen.] Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) +673 Infragistics.Web.UI.GridControls.ContainerGridBot.LoadAdditionalClientState(Object state) +1497 Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +202 Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() +73 Infragistics.Web.UI.GridControls.ContainerGrid.RaisePostDataChangedEvent() +91 System.Web.UI.Page.RaiseChangedEvents() +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485
Translated: implicit convertion from sql_variant to uniqueidentifier is not allowed
The table contains a guid column. The value is filled in the RowAdding Event:
void WebHierarchicalDataGrid1_RowAdding(object sender, Infragistics.Web.UI.GridControls.RowAddingEventArgs e) { Guid userid = Utils.Data.Convert2Guid(this.Request.QueryString["UserID"]); e.Values[AuctionStudio.Web.DAL.SQL.HelperClasses.ApsUserHistoryFields.ApsUserID.Name] = userid.ToString(); }
What's wrong?
Thanks,
Anton
Hi Anton,
This issue has been discussed: http://weblogs.asp.net/dwahlin/archive/2006/10/10/GUIDs-and-DataSource-Controls.aspx
Hope this helps