Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error - Only Elements Allowed
Message
From
22/11/2004 12:26:25
Dan Greenberg
Freedom of Information, Inc.
Parker, Colorado, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error - Only Elements Allowed
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00963544
Message ID:
00963544
Views:
70
I am evaluating MM to see if it will work with my data and application. I was trying to create a simple test Windows test form that mimics the way the example for Northwind works using my own SQL server data.

I know there must be something simple that I am missing. Any help will be greatly appreciated.

Thanks,


********************************************
Error Text:
********************************************

Only elements allowed (C:\FOIApps\MM Wintest 1\bin\Debug\MM Wintest 1.exe.config line 56)

********************************************************
********************************************************
Error occurs when calling the GetDataSet method
********************************************************
********************************************************

********************************************
my app.config has the following
********************************************

databases

add key="EPS\Connection" alue="server=electra;uid=XTEST;pwd=TESTPW;database=EPSquote;"
databases

This is a valid key since I have used it many times on this same machine when accessing the database.

********************************************
** Form Code
********************************************
public class ClaimantDetail : mmBusinessForm
{
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;
private OakLeaf.MM.Main.Windows.Forms.mmDataGrid dgClaimant;
private MMWinTest1.Business.Claimant oClaimants;
private DataSet ds;

public ClaimantDetail()
{
this.oClaimants = (Claimant)this.RegisterPrimaryBizObj(new Claimant());
InitializeComponent();
ds = oClaimants.GetClaimantsByQuoteID(1);
dgClaimant.DataSource = ds;
InitializeComponent call
}


********************************************
Business Object is set up as follows
********************************************

*** Abusobject
using OakLeaf.MM.Main;
using OakLeaf.MM.Main.Business;
using OakLeaf.MM.Main.Security;
using OakLeaf.MM.Main.Managers;

namespace MMWinTest1.Business
{
public class ABusinessObject : mmBusinessObject
{
public ABusinessObject()
{
this.DatabaseKey = "EPS";
this.RetrieveAutoIncrementPK = true;
}
}

********************************************
*** Specific Business Object
********************************************
using System;
using System.Data;

namespace MMWinTest1.Business
{
public class Claimant : ABusinessObject
{
public Claimant()
{
this.TableName = "Claimants";
this.PrimaryKey = "iclaimant";
string aa = this.DataAccessClass;
this.UpdateSelectStatement = "SELECT * FROM " + this.TableName;
}

public DataSet GetClaimantsByQuoteID(int id)
{
string selcmd = "SELECT * FROM Claimants WHERE iquote = "+id.ToString();
return this.GetDataSet(selcmd,CommandType.Text);
}
}
}
Next
Reply
Map
View

Click here to load this message in the networking platform