User Instances / AttachDBFile

vivusvivus Posts: 6
edited December 12, 2007 6:15PM in SQL Toolkit Previous Versions
will the new 4.0 beta support Syncing with user instances and attachDBFile?

is there an rss feed or email list when the new 4.0 is released and will it be compatible with the 2.0 framework?

Deepest Regards,


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    All of the programs in SQL Bundle 4.0 are compatible with .NET Framework 2.0. They require Framework 1.1, which is the Framework version they're targeted at.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Attachfile seems to work, but it's officially unsupported by the software. To get it working, you can enter the name of a SQL Server 2005 into the server box, followed by the attachdbfilename command:
    You will need a powerful account (probably sa) to log into the SQL Server 2005 in the logon credentials in SQL Compare, and also a database name to attach the file as. SQL Server 2005 will then attach the file to the server and you can compare it as a database.

    This saves you the additional step of attaching the file using the Management Studio before using SQL Compare/Data Compare to compare the database in the file.
  • I create a string to hold the name of the database and the attach string property, and, even though I test to make sue the file exists, the register command still says it doesnt... Any ideas?

    Public Sub SourceDatabase(ByVal serverName As String, ByVal databaseName As String, ByVal userName As String, ByVal password As String)
    Dim _connectionProperties As Engine.ConnectionProperties

    Dim _combinedServerName As String

    m_db1 = New Engine.Database

    If FileIO.FileSystem.FileExists(databaseName) Then
    _combinedServerName = String.Concat(serverName, "; AttachDBFileName=", databaseName)
    databaseName = "Source"
    _combinedServerName = serverName
    End If

    If String.IsNullOrEmpty(userName) Then
    _connectionProperties = New Engine.ConnectionProperties(_combinedServerName, databaseName)
    _connectionProperties.IntegratedSecurity = True
    _connectionProperties = New Engine.ConnectionProperties(serverName, databaseName, userName, password)
    End If

    m_db1.Register(_connectionProperties, m_engineOptions)
    End Sub
Sign In or Register to comment.