User Instances / AttachDBFile

Forum for users of SQL Toolkit 3,4,and 5

User Instances / AttachDBFile

Postby vivus » Wed Jan 11, 2006 11:14 pm

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,
Posts: 3
Joined: Wed Jan 04, 2006 3:09 pm
Location: Charlottesville, Va

Postby Brian Donahue » Tue Jan 24, 2006 5:23 pm


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 Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Postby Brian Donahue » Tue Jan 24, 2006 5:54 pm

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:
Code: Select all

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.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Still cant get this to work

Postby jprice2269 » Wed Dec 12, 2007 11:15 pm

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
Posts: 7
Joined: Sun Dec 02, 2007 3:52 pm

Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests