Options

Commit static data table with guid column

megasoft78megasoft78 Posts: 9
Hi,
I'm having an issue with SQL Source Control 3.0.4.40.
Everytime I try to commit a static data from a table with a Guid column I get the following exception:
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
   at System.Guid..ctor(String g)
   at #w1K.#X1K.GetGuid(Int32 i)
   at #w1K.#X1K.GetSqlGuid(Int32 i)
   at #8ZK.#p2K.#6eL(#p1K reader, Int32& sqlIndex, Int32 fieldIndex, #q2K td, ComparisonOptions comparisonOptions, SQLVersion version, Boolean binaryNewDataTypes, FieldPairs allPairs, Boolean runOnTwo)
   at #w1K.#I1K.#9bL()
   at RedGate.SQLDataCompare.Engine.ComparisonSession.#maL(#H1K reader1, #H1K reader2, TableMapping mapping, ProgressPercentageTracker progress)
   at RedGate.SQLDataCompare.Engine.ComparisonSession.CompareDatabases(Database db1, Database db2, TableMappings mappings, SessionSettings sessionSettings)
   at RedGate.SQLDataCompare.Engine.ComparisonSession.CompareDatabases(Database db1, Database db2, SchemaMappings mappings, SessionSettings sessionSettings)
   at RedGate.SQLDataCompare.Engine.ComparisonSession.CompareDatabases(Database db1, Database db2, SchemaMappings mappings)
   at RedGate.SQLSourceControl.Engine.Diff.DataCompareEngineUtils.#B31.#A46()
   at RedGate.SQLSourceControl.Engine.SharedUtilsUtils.DoActionWithCancel(ICancellableOperationStatus status, ICancellable cancellable, Action action)
   at RedGate.SQLSourceControl.Engine.Diff.DataCompareEngineUtils.#EcZ(ICancellableOperationStatus , Database , Database , SchemaMappings )
   at #qlhb.#A57.#l36(String , #B57 , ICancellableOperationStatus )
   at #qlhb.#K3c.#83c(String , #O9U , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
   at #qlhb.#A57.#f6c(String , Boolean , DatabaseConnection , Database , Database , SchemaMappings , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
   at #GWeb.#XXM.#acd.#ur2()
   at #GWeb.#Wheb.#tieb(Func`1 )
   at #GWeb.#XXM.#tYM()
   at #GWeb.#WXM.#qYM()
   at #GWeb.#XXM.#iS()
   at #qlhb.#0heb.#l36(String , #1heb , ICancellableOperationStatus )
   at #qlhb.#K3c.#83c(String , #O9U , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
   at #qlhb.#0heb.#wieb(#L3c , #ZZ7 , #A57 , #tEc , IObjectExplorerStateService , #xHR , #9ynb , #4Ec , #j3l , Options , #quBb , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks )
   at #GWeb.#VXM.#mYM[#NrPb](Func`2 , ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
   at #GWeb.#VXM.#jYM(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
   at #GWeb.#4Ec.#7Jc(ICancellableOperationStatus , IReadOnlySourceControlServerCallBacks , IDifferenceSelector )
   at #GWeb.#4Ec.#y25.#QB7b(ICancellableOperationStatus )
   at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.#u36.#k5f()
   at RedGate.SQLSourceControl.Engine.Cancellables.CancellableOperationBase.InvokeWithTracker(Action action)
   at RedGate.SQLSourceControl.Engine.Cancellables.MutexedCancellableOperation`1.Invoke()
   at #eEc.#Qlg.Invoke()
   at #JLc.#PLc.#Jfb.#EJf()
   at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.Do(Action , Predicate`1 , Boolean )
   at RedGate.SQLSourceControl.Engine.SmartAssembly.ExceptionReporting.ErrorReporterBase.DoWithObviousExceptionsRethrowAll(Action action)
   at RedGate.SQLSourceControl.CommonUI.Forms.ErrorDialog.DoWithObviousExceptionsRethrowAll(Action action)
   at #JLc.#PLc.#CTc(ICancellableOperation`1 , Object )

I checked the content of that column but it seems to be correct. Here the data I'm trying to commit:
a5a1ea2e-316a-470d-99fa-566fc143268a

Can anyone help me?

Best Regards,
Gabriele

Comments

  • Options
    Hi,
    I was able to spot the issue and I found a workaround for that.
    In my case the table column was an integer and was committed with some data already and when I tried to change the column type to Guid but keeping the same column name probably the software is trying to compare existing data in source control with the ones from database and it was failing to convert an integer into a Guid.
    My workaround was just to unlink static data and commit it. After that I just link again static data and everything work.

    Best Regards,
    Gabriele
  • Options
    Thanks for letting us know you found the problem.

    I believe I was in correspondence with your colleague about this. I assumed it would be bad data, but I can see how this could be caused when you change the data type.
    Chris
Sign In or Register to comment.