Error when connecting

Jul 21, 2009 at 6:01 PM
Edited Jul 21, 2009 at 6:04 PM

I received an error when connecting to a SQL server 2008 database on my localhost (see below). I'm running Windows 7 RC1 on my development machine.

It happens after my Test Connection is successful, then I hit 'Ok' on the 'New Database Connection' window and the error occurs.

Please let me know.  I would love to try using your software in our team's development process.

Thank You,
Sonny Ramsay

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at DBSourceTools.MainForm.newSourceDatabaseToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
DBSourceTools
    Assembly Version: 1.0.0.5
    Win32 Version: 1.0.0.5
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/DBSourceTools.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DBSourceToolsLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/DBSourceToolsLib.DLL
----------------------------------------
WeifenLuo.WinFormsUI.Docking
    Assembly Version: 2.3.1.19747
    Win32 Version: 2.3.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/WeifenLuo.WinFormsUI.Docking.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
DBConnectionLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/DBConnectionLib.DLL
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Microsoft.SqlServer.Smo
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.4035.00
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/Microsoft.SqlServer.Smo.DLL
----------------------------------------
Microsoft.SqlServer.ConnectionInfo
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.4035.00
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/Microsoft.SqlServer.ConnectionInfo.DLL
----------------------------------------
Microsoft.SqlServer.SmoEnum
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.4035.00
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/Microsoft.SqlServer.SmoEnum.DLL
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4918 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Microsoft.SqlServer.SqlEnum
    Assembly Version: 9.0.242.0
    Win32 Version: 9.00.4035.00
    CodeBase: file:///C:/Program%20Files%20(x86)/DBSourceTools/Microsoft.SqlServer.SqlEnum.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

Jul 21, 2009 at 7:48 PM

Ditto here.

Coordinator
Jul 22, 2009 at 1:43 AM

Hi there,

Many thanks for your detailed description of the problem, and after following what you are doing, I was able to reproduce it fairly quickly.

What is happening here is that you are attempting to add a source database without first creating a database project.  

The purpose of a database project is to specify a base directory for DBSourceTools to script files to, and also to store the Source | Target database tree structure (.dbsp files)

To create a database project, click on File | New | Project.  This will bring up the New Project screen, where you specify the project name and base directory.  From this new project screen, you can then go on to select a database.

If you do not have a database project, and click on Database | Add | New Source Database, you will get the error that you are experiencing.

I'll make some changes to the code base to prevent this from happening in the future.

Many thanks for your input.  Please let me know if this helps.

- Nathan.

 

 

 

 

Aug 4, 2009 at 10:15 PM

Great.  That fixed the problem!

I did get another error when trying to 'Load from Database'.  I entered it in the Issue Tracker.

Many Thanks,

Sonny Ramsay