Issues when login password has digits

evgkibevgkib Posts: 8
I'm having issues when registering a database and the login password has digits.

Unhandled Exception: System.InvalidCastException: Unable to cast object of type
'System.DBNull' to type 'System.String'.
at #8rg.#Ssg.#2lh()
at #8rg.#Ssg.#wlh()
at RedGate.SQLCompare.Engine.Database.RegisterForDataCompare(ConnectionProper
ties connectionProperties, Options options)
at SQLDataCompareCodeSnippets.SyncData.RunExample(String db, String[] tables)
in c:\temp\RedGateDataSync\SyncData.cs:line 59
at SQLDataCompareCodeSnippets.Program.Main(String[] args) in c:\temp\RedGateD
ataSync\Program.cs:line 105

It doesn't happen when the password is characters only.

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Sorry to say I don't see how the password comes into it. I can decode the stack trace here at red Gate and the step at which it fails is "populate constraints". So it is logging in - after that point the password should not be relevant as it only uses one login and then it maintains the connection for the whole session.

    If you are on version 10 you can try newer versions of the DLLs - here is a private patch you can try:
    ftp://support.red-gate.com/patches/SQL_ ... .0.438.zip
  • After installing the update I'm getting this now:
    Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl
    y 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3
    856ad364e35' or one of its dependencies. The located assembly's manifest definit
    ion does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    at #8rg.#Ssg.#Llh(DBPopulationOptions #WXrc, Boolean #YXrc)
    at #8rg.#Ssg.#wlh()
    at RedGate.SQLCompare.Engine.Database.RegisterForDataCompare(ConnectionProper
    ties connectionProperties, Options options)
    at SQLDataCompareCodeSnippets.SyncData.RunExample(String db, String[] tables)
    in c:\temp\RedGateDataSync\SyncData.cs:line 46
    at SQLDataCompareCodeSnippets.Program.Main(String[] args) in c:\temp\RedGateD
    ataSync\Program.cs:line 106
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Sorry about that. You can get the System.Threading DLL from an installed Red Gate product's program folder, c:\program files (x86)\red gate\sql compare 10 for instance, and copy this into your app's bin folder. That should fix it.
  • I can't find System.Threading in the SDK installation folder.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Please allow me to clarify again - the file is *not* in the SDK installer. You have to grab it from some other Red Gate program folder. I can send the file to you if you don't have any Red Gate releases (like SQl Compare) installed anywhere.
  • Yes, please do send it to me. It'd be greatly appreciated. Thanks.
  • I'm confused. Why is the latest version of SQL Compare referencing a version of a deprecated .Net assembly? Microsoft ended support for .Net 1.0 years ago. I'm not comfortable installing this assembly on a Windows 2008 system, as this version of .Net is not even supported there:

    http://msdn.microsoft.com/en-us/library/cc531167.aspx

    Is there a technical reason SQL Compare is referencing this version of .Net?
Sign In or Register to comment.