Error Filling Business Objects Using Enterprise Server


Author
Message
Jared Ewald
Jared Ewald
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: StrataFrame Users
Posts: 18, Visits: 43
Hello. I am getting an error whenever I try to fill a business object when an EnterpriseDataSourceItem is used as the datasource. The error is reporting that "[t]he specified DataSourceKey was not found within the collection." However, I have verified that the DataSourceKey is correct for the business objects (it's the default empty string) and that the server contains the correct key.



I have declared the datasource like so:



EnterpriseDataSourceItem dss = new EnterpriseDataSourceItem("", "SERVER", 80, "smalldb", new OracleDataSourceItem("")) ;





The stack trace is below. Any ideas?



Thanks,



Jared



EnterpriseDataSourceException

An error occurred while executing the command on the remote data source. See the inner exception for more details.

IndexOutOfRangeException

The specified DataSourceKey was not found within the collection.



Source : MicroFour StrataFrame Enterprise Client



Stack Trace:

at MicroFour.StrataFrame.Data.DataSourceCollection.get_Item(String DataSourceKey)

at MicroFour.StrataFrame.Data.Enterprise.RequestProcessor.ExecuteDataTable(ExecuteDataTableParams params)

at MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem.a(DbCommand A_0, Boolean A_1, String A_2)

at MicroFour.StrataFrame.Data.Enterprise.EnterpriseDataSourceItem.GetDataTable(QueryInformation QueryInfo, OnChangeEventHandler CallBack)

at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(QueryInformation QueryInfo, Boolean RegisterNotification)

at MicroFour.StrataFrame.Business.BusinessLayer.FillOrGetByPrimaryKey(Object[] PrimaryKeyValues, Boolean ReplaceCurrentDataTable)

at MicroFour.StrataFrame.Business.BusinessLayer.FillByPrimaryKey(Object PrimaryKeyValue)

at PROGRAM.PANEL.populateInformation() in FILEWITHEXCEPTION:line 172

at PROGRAM.PANEL.performSearch() in FILEWITHEXCEPTION:line 420

at PROGRAM.PANEL.txtbox_KeyDown(Object sender, KeyEventArgs e) in FILEWITHEXCEPTION:line 605

at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)

at System.Windows.Forms.MaskedTextBox.OnKeyDown(KeyEventArgs e)

at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)

at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)

at System.Windows.Forms.MaskedTextBox.ProcessKeyMessage(Message& m)

at System.Windows.Forms.Control.WmKeyChar(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.TextBoxBase.WndProc(Message& m)

at System.Windows.Forms.MaskedTextBox.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Replies
Jared Ewald
Jared Ewald
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: StrataFrame Users
Posts: 18, Visits: 43
I have since checked the queries reaching the server using Oracle Enterprise Manager as well as the server configuration. Everything there seems to be fine. However, business objects that I am trying to fill with fillByPrimaryKey that have a number (System.Decimal) as a primary key are still not being filled when an enterprise server datasource is used instead of a direct Oracle datasource. Does anyone have a solution to this problem?



Thanks,



Jared





Jared Ewald (10/05/2007)
I turned on debugging and found that the exact same (valid) queries are being passed to the server in both situations. In addition, I have verified that the direct connection string and the connection string on the ES are identical. Upon further investigation into this problem, I have discovered that the only case where business objects are not filling is when the FillByPrimaryKey method is used AND the primary key of the object being filled is a Number. (When the primary key is a string, everything works fine. In addition, everything works fine when the data source is switched to the direct Oracle data source.)



Any thoughts?



Thanks for all of the help!



Jared

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
We will just have to setup this scenario.  The problem you are describing just doesn't make any logical sense as it relates to how the ES actually operates.  So the only thing that we can do is setup an ES server here that talks with Oracle and test your situation.  Thanks. Smile
Jared Ewald
Jared Ewald
StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)StrataFrame Beginner (20 reputation)
Group: StrataFrame Users
Posts: 18, Visits: 43
Sounds good. Thanks for all of the help! It is much appreciated! Smile



Jared
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search