Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A database key must be specified
Message
De
12/03/2007 17:52:38
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
A database key must be specified
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01202868
Message ID:
01202868
Vues:
65
Windows forms application with mm 2.3

I am having difficulty getting this "A database key must be specified" error to go away. It appears as soon as you click OK on the login form. The database does exist and the business object generator has no problem finding it. This is the detail. Any help appreciated.

ABusinessObject has this:

this.DatabaseKey = "mData";

This is from the app.config (both the business project and the windows project are the same)
(I also removed the tags as they caused a complaint by the forum)

add key="mData\Connection" value="server=(local);uid=ATMConnect;pwd=gologin;database=ATM4;"
add key="xReturn\Connection" value="server=(local);uid=ATMConnect;pwd=gologin;database=ATM4Return;"
add key="mData\DataAccessClass" value="DataAccessSql"
add key="xReturn\DataAccessClass" value="DataAccessSql"

The error detail shows this occurs at:
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataAccessObject(String databaseKey)
at OakLeaf.MM.Main.Managers.mmUserManager.AuthenticateUser(String userID, String password, String databaseKey)
at OakLeaf.MM.Main.Managers.mmUserManager.AuthenticateUser(String userID, String password, String databaseKey, String userIDConnect, String passwordConnect)
at OakLeaf.MM.Main.Windows.Forms.mmUserLoginForm.AuthenticateUser(String userID, String password, String databaseKeyConnect, String userIDConnect, String passwordConnect)
at OakLeaf.MM.Main.Windows.Forms.mmUserLoginForm.AuthenticateUser()
at OakLeaf.MM.Main.Windows.Forms.mmUserLoginForm.btnOK_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.OnMouseUp(MouseEventArgs mevent)
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.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.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at PacificaSystems.AccuTraxMobile.Main.AppMainEntry.Main() in C:\DevelopC#\AccuTraxMobileV4\AccuTraxMobile\Main.cs:line 38
Timothy Bryan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform