Search found 14 matches

by TroelsLarsen
Fri 07 Aug 2009 09:03
Forum: dotConnect for Oracle
Topic: SP returning associative arrays - possible?
Replies: 9
Views: 4072

SP returning associative arrays - possible?

I'm having a lot of trouble getting data out of a stored procedure - the signature of it looks like this:

PROCEDURE net_drl_hdr_post_query(
p_drl_hdr_no IN drl_hdr.drl_hdr_no%TYPE,
p_norm_install_hours out norm_hour.install_norm_hour%TYPE,
p_quan_in_order out t_my_type,
p_quan_stock_tot out t_my_type,
p_quan_reserved_pick_lst out t_my_type
)

where t_my_type is:
TYPE t_my_type IS TABLE OF NUMBER INDEX BY BINARY_INTEGER

I try the following:

Code: Select all

using (var cmd = conn.CreateCommand())
                {
                    cmd.CommandText = "STD73_UDV.S201_BIZ.NET_DRL_HDR_POST_QUERY";
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add(new OracleParameter("P_DRL_HDR_NO", OracleDbType.Number));
                    cmd.Parameters["P_DRL_HDR_NO"].Value = 2815;
                    cmd.Parameters["P_DRL_HDR_NO"].Direction = ParameterDirection.Input;

                    cmd.Parameters.Add(new OracleParameter("P_NORM_INSTALL_HOURS", OracleDbType.Number));
                    cmd.Parameters["P_NORM_INSTALL_HOURS"].Direction = ParameterDirection.Output;

                    cmd.Parameters.Add(new OracleParameter("P_QUAN_IN_ORDER", OracleDbType.Number));
                    cmd.Parameters["P_QUAN_IN_ORDER"].Direction = ParameterDirection.Output;

                    cmd.Parameters.Add(new OracleParameter("P_QUAN_STOCK_TOT", OracleDbType.Number));
                    cmd.Parameters["P_QUAN_STOCK_TOT"].Direction = ParameterDirection.Output;

                    cmd.Parameters.Add(new OracleParameter("P_QUAN_RESERVED_PICK_LST", OracleDbType.Number));
                    cmd.Parameters["P_QUAN_RESERVED_PICK_LST"].Direction = ParameterDirection.Output;


                    cmd.ExecuteNonQuery();

                    var tmp = cmd.Parameters["P_QUAN_IN_ORDER"].Value;
                }
Am I doing something wrong, or is this not possible?
by TroelsLarsen
Thu 29 Jan 2009 10:12
Forum: dotConnect for Oracle
Topic: Problem since installing 5.00.20
Replies: 8
Views: 2750

We were moving to a new server anyway (old was 10.2.0.3.0, new is 10.2.0.4.0), and that seems to have done the trick.

I honestly don't know what caused this, but for us, it is resolved. I'm partial to blame the Virtual PC setup. I'll try the unicode on the old server tag just out of curiosity.
by TroelsLarsen
Tue 27 Jan 2009 14:17
Forum: dotConnect for Oracle
Topic: Problem since installing 5.00.20
Replies: 8
Views: 2750

Shalex wrote:We cannot reproduce the problem.
Please give us the following information.
1. Version of your Oracle server, its charset.
2. What regional settings are set on your computer (Control Panel --> Regional and Language Options, the Regional options tab (Standards and formats, Location) and the Advanced tab (Language for non-Unicode programs))?
3. Could you please send me (alexsh*devart*com) a small test project that reproduces the problem? Please include definitions of database objects and avoid using third-party components.
We're moving it from a virtual machine to hardware, I'll let you know if this solves it, otherwise I'll post the information you requested..
by TroelsLarsen
Tue 27 Jan 2009 09:26
Forum: dotConnect for Oracle
Topic: Problem since installing 5.00.20
Replies: 8
Views: 2750

I just discovered something new:

This connection string works fine:
- User ID=XXXXX; Password=XXXXX; Data Source=MARSNET; Direct=False;

This one doesn't:
User ID=XXXXX; Password=XXXXX; Data Source=AppServer; SID=orcl; Direct=true; Port=1522;

Do you have any ideas as to what the problem is using direct?

The problem is not new to 5.0.20.0, it is also there in 5.0.12.0. It might not be a bug in the provider at all, but any ideas as to where this problem lies are greatly appreciated.
by TroelsLarsen
Mon 26 Jan 2009 08:54
Forum: dotConnect for Oracle
Topic: Problem since installing 5.00.20
Replies: 8
Views: 2750

Problem since installing 5.00.20

Ever since we started using 5.00.20, we've been having a weird problem with the data retrived. When trying to fetch the VARCHAR2(50) field, "value" from our configuration table, we get "LastUse" instead of the actual value "LastUsedProject". Similarly, "LocationAndSize" becomes "Locatio".

Has anyone experienced anything similar? We haven't changed any code in places that would cause this behaviour, and the offending line is as close to the provider as possible:

string name = r["Name"].ToString();

where r is a DbDataReader.
by TroelsLarsen
Fri 12 Dec 2008 08:18
Forum: dotConnect for Oracle
Topic: Entity Framework: "OUTER APPLY is not supported by Oracle"
Replies: 2
Views: 3508

Thanks - and weird (of the EF team) that they decided to use OUTER APPLY at all, all things considered.

Sorry that I didn't see the other post, I only searched the Oracle forums.
by TroelsLarsen
Thu 11 Dec 2008 14:28
Forum: dotConnect for Oracle
Topic: Entity Framework: "OUTER APPLY is not supported by Oracle"
Replies: 2
Views: 3508

Entity Framework: "OUTER APPLY is not supported by Oracle"

When I try to .Include a particular table in my query, I get an "OUTER APPLY is not supported by Oracle" error on runtime.

How can I learn more about what's causing it? Is the problem with the entity framework, or is there support missing from dotConnect?

Does the entity framework generate the OUTER APPLY, or does dotConnect?
by TroelsLarsen
Fri 28 Nov 2008 16:11
Forum: dotConnect for Oracle
Topic: System.OutOfMemoryException since upgrade
Replies: 8
Views: 3053

Hmm.. ok.. It just seems odd that the feature is now broken when it worked before.

Might also be something to mention when you write "Visual Studio EDM Wizard support" on your features page.. Not being able to add tables after initial creation is a pretty big drawback for someone expecting this feature. That being said, we only use the wizard for quick model testing, so it isn't a tremendous drawback for us.
by TroelsLarsen
Thu 27 Nov 2008 08:46
Forum: dotConnect for Oracle
Topic: System.OutOfMemoryException since upgrade
Replies: 8
Views: 3053

System.OutOfMemoryException since upgrade

Ever since upgrading to dotConnect from oraDirect, I seem to run into problems with the entity designer in visual studio 2008.

I can add tables to the model initially, but when I chose any option under "update model from database", I get a System.OutOfMemoryException.
by TroelsLarsen
Thu 21 Aug 2008 15:20
Forum: dotConnect for Oracle
Topic: Problem after upgrading to VS2008 SP1 RTM
Replies: 15
Views: 15290

Thanks for the update - works like a charm so far. And seemingly faster than before, but that might also be due to the newer Wizard.
by TroelsLarsen
Tue 12 Aug 2008 10:24
Forum: dotConnect for Oracle
Topic: Problem after upgrading to VS2008 SP1 RTM
Replies: 15
Views: 15290

Excellent, thanks.
by TroelsLarsen
Tue 12 Aug 2008 09:12
Forum: dotConnect for Oracle
Topic: Problem after upgrading to VS2008 SP1 RTM
Replies: 15
Views: 15290

Problem after upgrading to VS2008 SP1 RTM

After upgrading from the beta, I can no longer use the data entity wizard. I have reinstalled the OraDirect provider, to no avail.

After selecting a connection, or creating a new one, I get the following exception:
An error occurred while connecting to the database. The database might be unavailable. An exception of type 'System.Data.EntityCommandCompilationException' occurred. The error message is: 'An error occurred while preparing the command definition. See the inner exception for details. The inner exception caught was of type 'System.MethodAccessException', with this error message: 'System.Data.Common.CommandTrees.DbCommandTree.Validate()'.'
Does anyone have an idea on how to resolve this?
The databases I've tried are all working just fine. The problem only cropped up after installing SP1 RTM. Does the current version of OraDirect.Net not support RTM?

EDIT: Testing the connection in the Wizard works fine.
UPDATE: Two of my colleagues are experiencing the same problem, one of them on a fresh installation of VS2008 SP1.
by TroelsLarsen
Thu 07 Aug 2008 11:22
Forum: dotConnect for Oracle
Topic: Exception while generating model
Replies: 3
Views: 2736

Excellent, thank you for your answer, I'm really hoping to be able to use the Entity Framework for our application. For now, I will install a local oracle server and reduce the number for tables.
by TroelsLarsen
Thu 07 Aug 2008 09:49
Forum: dotConnect for Oracle
Topic: Exception while generating model
Replies: 3
Views: 2736

Exception while generating model

I'm trying to generate a model against a large Oracle database, it takes 6-8 minutes to fetch the list of objects (tables, views etc.) from the server. (Using the Entity Wizard)

After selecting two tables for modelling, it appears to freeze VS2008. Yesterday I decided to just let it be and went home after starting it.. Here is what greeted me this morning:
Added connection string to App.Config
ERROR: Unable to generate model due to the following exception: The store metadata has not been generated yet, please call GenerateStoreMetadata() first.
Loading metadata from database took 00:06:02.8438734
Generating model took 17:01:01.6690076
Writing out edmx file took 00:00:00.0977825
What is the problem, and why is it so slow? Note that there are roughly 700 tables in the schema. However, when using the Wizard, I am shown ALL objects on ALL schemas, meaning that there is almost 3000 tables alone?! Is there any way to have it consider only those in the proper schema? (Assuming the number of tables is the problem)

I can get everything to work if I connect to a server with a smaller number of tables.