1

I get this error when trying to modify the EntityFramework_CodeFirst and EntityFramework_CodeFirst2 projects:

Opening Connection [U2][UCINET-UO] [U2][UCINET-UO]WIN32 API Error:10053 An established connection was aborted by the software in your host machine[Rocket U2][UCINET - UNIRPC][ErrorCode=81009] The RPC failed Error in Socket Send and dataLength:36

Inner Exception:Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. Inner Exception:WIN32 API Error:10053An established connection was aborted by the software in your host machine[Rocket U2][UCINET - UNIRPC][ErrorCode=81009] The RPC failed Error in Socket Send and dataLength:36

I have set my connection string to:

<add name="CustomerContext" connectionString="Database=dbPath;UserID=userId;Password=password;Server=serverIp;Pooling=false;ServerType=universe;ConnectTimeout=500;PersistSecurityInfo=true" providerName="U2.Data.Client" />

Using those same credentials I can successfully connect using the U2 DB Provider for .NET test connection program on both the ADO.NET and UniObjects connections. I just cannot get it to work for the EntityFramework_CodeFirst projects.

The UNIRPC is running on the host machine. Port 31438 is listening. Firewalls are off.

EDIT: I have set the environment variables UCINETTRACE and UCINETTRACESWITCH and have a trace log of the DataAdapter Sample. This is a snippet of the interesting part. Full trace here

5/30/2012 10:56:53 AM:ThreadID: ThreadID: 11 Thread Name : Cursor #1--UciStatement::OpenServerCursor() and SQL String::call *HS.OLEDBINFO('ACCTS', '', '', '', '', '1', '', 0, 1) 5/30/2012 10:56:53 AM:ThreadID: Exiting:ThreadID: 11 Thread Name : UciStatement::OpenServerCursor() 5/30/2012 10:56:53 AM:ThreadID: Entering:ThreadID: 11 Thread Name : UciStatement::AssociateServerCursor() 5/30/2012 10:56:53 AM:ThreadID: Exiting:ThreadID: 11 Thread Name : UciStatement::AssociateServerCursor() 5/30/2012 10:56:53 AM:ThreadID: Entering:ThreadID: 11 Thread Name : UciStatement::()ServerExecute 5/30/2012 10:56:53 AM:ThreadID: Entering:ThreadID: 11 Thread Name : UciStatement::ServerExecuteSql() 5/30/2012 10:56:53 AM:ThreadID: ThreadID: 11 Thread Name : [U2][UCINET][UNIVERSE]:ERROR: CAN'T EXECDIRECT SELECT FROM @TMP

EDIT 2: I have the HS.SALES example working and I am on UniVerse 11.4 (current). I spoke with Rocket Support and I did not know that I needed to authorize individual UV accounts with HS.ADMIN, which was likely the problem. I thought a solid connection to the database was going to cut it, especially since HS.SALES was working. I still need to "SQLize" my DICT files to allow them to work on ADO.NET (& EF) but I almost have it now.

Community
  • 1
  • 1
Daniel E
  • 529
  • 1
  • 4
  • 18

2 Answers2

0

Did you try DataAdapter Sample with same connection string? Is this working? Could you please provide TRACE LOG? You need to set the following :

Trace and Debug To debug your U2 Database Provider for .NET applications, you can use the U2 trace facility. To activate the trace facility, set the following environment variables:

SET UCINETTRACE=c:\temp

SET UCINETTRACESWITCH=4

Rajan Kumar
  • 718
  • 1
  • 4
  • 9
  • I'm sorry, I am not familiar with setting up environment variables that way in Visual Studio (I'm using 2010 SP1). I searched online and found [this way of doing it](http://www.delphi-ts.com/blogs/lozzi/post/2007/04/06/Enable-Trace-Logging-with-UniObjectsNet.aspx). I'm not sure if that is correct, but when I run it, I get "_The type initializer for 'U2.Data.Client.Common.UniTrace' threw an exception_" and in the log file: "_ImageFileMachine:ImageFileMachine.I386I386 U2.Data.Client, Version=1.1.0.0, Culture=neutral, PublicKeyToken=9ab9148678f4f448 Assembly is platform independent._" – Daniel E May 29 '12 at 23:28
  • You need to open Control Panel->System->Advanced System Settings->EnvironmentVarables->System varables. But you have first shutdown Visual Studio 2010. When you run the code, a log file will be generated . For example : c:\temp\ucinet*****.txt. Read http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/ – Rajan Kumar May 30 '12 at 16:20
  • One more question. Did you try DataAdapter Sample Code? – Rajan Kumar May 30 '12 at 18:23
  • Yes, I have switched to trying to the DataAdapter instead for now just to get the connection working. DataAdapter Sample code is failing too. – Daniel E May 30 '12 at 19:00
  • Thank you for providing me log/trace file. I am working on it. I will update you soon. – Rajan Kumar May 30 '12 at 20:56
  • It looks like subroutine [*HS.OLEDBINFO('ACCTS', '', '', '', '', '1', '', 0, 1)] is failing. I would like to know the following: 1. What is your UniVerse Database Version? 2. Could you please send me server side log file? For example: C:\U2\UV\HS.SALES\ .hs_debuginfo 3. Go to your account and find the file ‘.hs_debuginfo’. See the line “STMT SELECT….” Did you try the sample as it is with HS.SALES account? – Rajan Kumar May 30 '12 at 23:01
  • Thank you for your help, Rajan! I am closer to getting my db connected with Entity Framework now. I wish I could upvote your answer here b/c of all your help. When I get more reputation I will... Anyways, I will update my DICTs and if I have any further issues with Entity Framework I will edit my post. – Daniel E May 31 '12 at 01:27
  • You do not need to 'SQLize' the account. You can select multi-value field using UNNEST and U2ConnectionStringBuilder/FirstNormalForm=false. I do not understand what the problem with your account is. If you can send U2 Support strip version of your account, we can try something. Can you please send '.hs_debuginfo' to U2 Support? It will give us some idea. – Rajan Kumar Jun 01 '12 at 02:56
  • U2 Support could not direct me to hs_debuginfo. I gave them the same client trace file as you. They gave me an updated version of the .dll (1.1.0.525) and new sample code, but I ran into the same error. – Daniel E Jun 06 '12 at 17:15
  • Please work with U2 Support in this issue. I have seen some reply in rocket customer portel. – Rajan Kumar Jun 08 '12 at 18:25
0

Caould please try U2NETDK v1.2.0? I hope it will solve the above mentioned problem.

U2NETDK v1.2.0 BETA contains U2 Database Add-ins for Visual Studio 2010. Now you can use VS2010 Server Explorer to populate U2 Tables, Views and Subroutines.

It will allow you to create DataSet and Entity Data Model.

Rajan Kumar
  • 718
  • 1
  • 4
  • 9