Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with Sample app
Message
De
21/11/2008 11:32:09
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01363490
Message ID:
01363513
Vues:
45
>Your Solution has multiple projects in them. When you hit F5 to have Visual Studio "run" the app., it has to decide which one of the projects to run (it's perfectly valid to have both a WinForms app., a console app, and a web app inside of the same project). Currently, a class library project is set as the main "startup" app., which is why it's complaining (it can't "run" a class library). Right-click on the WinForms or ASP.NET web project and select "Set as Startup Project". You can see the one that's currently selected since the project name is bold. Then re-run and it should work as expected.


Thanks Paul.

That got me started. I can now launch the app and it asked me to run some first-time SQL scripts which seemed to run without errors. Then, following the doc, I opened the Customer | Orders screen I got this error:

"Object reference not set to an instance of an object."

The stack trace shows:

at OakLeaf.MM.Main.Data.mmDataAccessSql.CreateDataAdapter(IDbCommand command)
at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, IDbCommand command, String tableName, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessSql.FillDataSet(DataSet ds, String command, String tableName, CommandType cmdType, IDbDataParameter[] dataParms, Boolean clearOnFill)
at OakLeaf.MM.Main.Data.mmDataAccessBase.FillDataSet(DataSet ds, String command, String tableName)
at OakLeaf.MM.Main.Data.mmDataAccessSql.GetEmptyDataSetBySproc(DataSet ds, String tableName, String schema, String sprocName, DataTable sprocParamsTable)
at OakLeaf.MM.Main.Data.mmDataAccessSql.GetEmptyDataSetBySproc(DataSet ds, String tableName, String schema, String sprocName)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataTable(DataSet& ds, String tableName, mmDataAccessBase dao)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet(DataSet ds, String tableName, String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet(String tableName, String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet(String tableName)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetEmptyDataSet()
at OakLeaf.MM.NorthwindSample.CustomerOrdersForm..ctor() in C:\Program Files\Mere Mortals .NET Framework 2008\Samples\MM Northwind Sample Application_CSharp\CustomerOrdersForm.cs:line 53
at OakLeaf.MM.NorthwindSample.Main.Windows.Forms.MainForm.CustomerOrdersBar_Click(Object sender, EventArgs e) in C:\Program Files\Mere Mortals .NET Framework 2008\Samples\MM Northwind Sample Application_CSharp\MainForm.cs:line 68
at System.EventHandler.Invoke(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.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
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.ScrollableControl.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.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at OakLeaf.MM.NorthwindSample.Main.AppMainEntry.Main() in C:\Program Files\Mere Mortals .NET Framework 2008\Samples\MM Northwind Sample Application_CSharp\Main.cs:line 76


So it looks like I've got a data adapter problem of some sort. But I ~am~ getting database access because I can run the 'Employees" list without a problem.

Any immediate thoughts as to what I need to adjust?

Guy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform