yasser777 / nettiers

Automatically exported from code.google.com/p/nettiers
0 stars 0 forks source link

How can I use .netTiers in windows server 2008 X64 and Oracle 11g #375

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. build the solution, it's OK.
2. run the program, when I open a web page, I get the Exception.
3. I find the solution use the "System.data.Oracleclient", and it's for 32 bit, 
but we need the 64 bit DLL.

So, what can i do? thanks.

What version of .netTiers and CodeSmith are you using?
.netTiers 2.3.1 codesmith 5.3.1

Please use labels and text to provide additional information.
the error infomation:
System.InvalidOperationException: Attempt to load Oracle client libraries threw 
BadImageFormatException. This problem will occur when running in 64 bit mode 
with the 32 bit Oracle client components installed. ---> 
System.BadImageFormatException: An attempt was made to load a program with an 
incorrect format. (Exception from HRESULT: 0x8007000B).

Original issue reported on code.google.com by Rising...@gmail.com on 21 Feb 2011 at 12:46

GoogleCodeExporter commented 9 years ago
I selected the Microsoft Enterprise Library 5.0, dotnet version V4

Original comment by Rising...@gmail.com on 21 Feb 2011 at 12:51

GoogleCodeExporter commented 9 years ago
1. Oracle 11g is 64bit.
2. I download the oracle client 32bit, and add it to my OS, then I use the 
SCOTT user account and the table DEPT, the error message changed:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SCOTT.DEPT_GETPAGED' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Original comment by Rising...@gmail.com on 21 Feb 2011 at 3:02

GoogleCodeExporter commented 9 years ago
Hello,

Did you execute the stored procedures that are generated into the SQL Folder?

Thanks
-Blake

Original comment by bniemyjski on 4 Mar 2011 at 8:06

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 4 Mar 2011 at 8:06

GoogleCodeExporter commented 9 years ago
Thanks Blake.
yes, I do execute the stored procedures that are generated into the SQL Folder, 
but I did not execute the "Setup the cursor script", and the 
'SCOTT.DEPT_GETPAGED' created.

I use the SCOTT user account and the table DEPT, the type of DEPT.DEPTNO is 
NUMBER(2, 0), when i click the "DEPT" link button in the administration default 
page, it has another Exception, I find in the function "public static 
TList<Dept> Fill(IDataReader reader, TList<Dept> rows, int start, int 
pageLength)", 
the code 'key = new 
System.Text.StringBuilder("Dept").Append("|").Append((System.Byte)reader[((int)D
eptColumn.Deptno - 1)]).ToString();' throws a Exception: can't unbox 
reader[((int)DeptColumn.Deptno - 1)] as byte(the call stack is 
:Scott.Data.Bases.DeptProviderBaseCore.Fill(IDataReader reader, TList`1 rows, 
Int32 start, Int32 pageLength) in 
C:\Users\Administrator\Desktop\scott\Scott.Data\Bases\DeptProviderBase.generated
Core.cs:198
). 

Then I click the "EMP" link button in the administration default page, it has a 
same Exception, Exception message is: can't unbox reader[((int)EmpColumn.Empno 
- 1)] as int(the call stack is: 
Scott.Data.Bases.EmpProviderBaseCore.Fill(IDataReader reader, TList`1 rows, 
Int32 start, Int32 pageLength) in 
C:\Users\Administrator\Desktop\scott\Scott.Data\Bases\EmpProviderBase.generatedC
ore.cs:283
).

Original comment by Rising...@gmail.com on 11 Mar 2011 at 2:58

GoogleCodeExporter commented 9 years ago
OK, I create a new table and use the int type, and it OK.
thanks you, Blake :)
           Edward

Original comment by Rising...@gmail.com on 11 Mar 2011 at 3:11

GoogleCodeExporter commented 9 years ago
Hello,

You will need to execute the setup cursor script or their will be runtime 
errors in .netTiers along with script execution errors creating those 
procedures. Does this happen for all number columns for you?

Thanks
-Blake

Original comment by bniemyjski on 16 Mar 2011 at 7:11

GoogleCodeExporter commented 9 years ago
Hello,

  This do not happen for all Number columns, this just happen for Number(p, s) columns(p and s is not zero), for example, number(3, 1), number(9, 0).

Thanks 
Edward

Original comment by Rising...@gmail.com on 17 Mar 2011 at 1:04

GoogleCodeExporter commented 9 years ago
Hello,

You will need to open up the CommonSqlCode.cs file located in the TemplateLib 
folder. Navigate to line 3664 via control + h. Then paste the following code:

            if (field.NativeType.ToLower() == "number")
            {
                return "System.Decimal" + (field.AllowDBNull ? "?" : "");
            }

Thanks
-Blake

Original comment by bniemyjski on 13 Apr 2011 at 6:43

GoogleCodeExporter commented 9 years ago
Thank you Blake
    Edward

Original comment by Rising...@gmail.com on 20 Apr 2011 at 2:02