Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vistadb does not save
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
VistaDB
Divers
Thread ID:
00999449
Message ID:
01001968
Vues:
17
I create an equivalent VistaDB Database to the SQL Server version with the VistaDB Data Migration utility

I then added below to the business.cs file

protected override OakLeaf.MM.Main.Data.mmDataAccessBase CreateDataAccessObject(string dataAccessClassName)
{
if (dataAccessClassName.ToLower() == "vistadb")
{
return new mmDataAccessVistaDB();
}
else
{
return base.CreateDataAccessObject (dataAccessClassName);
}
}

I then changed the app.config

add key="CustA\Northwind\Connection" value="DataSource=c:\\Northwind.vdb;Database=c:\\Northwind.vdb;Cypher=None;Exclusive=False;ReadOnly=False"
add key="CustA\Northwind\DataAccessClass" value="VistaDB"

I started the app selected the Lists – Employees and attempted to add an employee

Application Exception Occurred

Message:

The DataAdapter.SelectCommand property needs to be initialized.

Stack Trace:

at System.Data.Common.CommandBuilder.BuildCache(Boolean closeConnection)
at System.Data.Common.CommandBuilder.GetInsertCommand()
at System.Data.SqlClient.SqlCommandBuilder.GetInsertCommand()
at OakLeaf.MM.Main.Data.mmDataAccessSql.CreateInsertCommand()
at OakLeaf.MM.Main.Data.mmDataAccessVistaDB.SaveDataSet(DataSet ds, String tableName, String primaryKeyName, Boolean retrieveAutoIncrementPK, IDbDataAdapter dbAdapter)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey, IDbDataAdapter dbAdapter)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName, String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(DataSet ds, String tableName)
at OakLeaf.MM.Main.Business.mmBusinessObject.SaveDataSet(String tableName, Int32 currentRow)
at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Save(mmBusinessObject bizObj, String tableName)
at OakLeaf.MM.Main.Windows.Forms.mmButtonHelper.SaveHandler(Object button, String bindingSource, String bindingSourceMember, mmBaseBusinessObject& bizObj)
at OakLeaf.MM.Main.Windows.Forms.mmButtonSave.mmButtonSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.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.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.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 2003\Samples\MM Northwind Sample Application_CSharp\Main.cs:line 46
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform