I am using ODAC version 6.9.0.58 with Delphi 2009. Oracle client is 11.2.0.1 and Oracle server is also 11.2.0.1.
I have set the following properties, everything else is the default.
OraCall.OCIUnicode := true;
OraSession1.Options.EnableNumbers := true;
OraSession1.Options.UseUnicode := true;
The problem is, when I create the table below, then try to select * from it using a TSmartQuery connected to a TDBGrid with TDataSource, I get an exception when I try to open the TSmartQuery.
Does anyone know what is going on? Demo app is as simple as dropping TSmartQuery, TOraSession, TDataSource, and TDBGrid on a form, hooking them up, setting connection info and query, and the few properties above, then trying to open the TSmartQuery.
I have noticed that it is the NUMBER(16) column which is causing the problem. If I null out the data, the error goes away.
Code: Select all
CREATE TABLE TEST_NUMBERS
(
NUM_14 NUMBER(14),
NUM_15 NUMBER(15),
NUM_16 NUMBER(16)
)
TABLESPACE USERS;
Insert into TEST_NUMBERS
(NUM_14,
NUM_15, NUM_16)
Values
(25045808041509, 25045808041509, 25045808041509);
COMMIT;
Application:
-------------------------------------------------------
1.1 Start Date : Wed, 20 Oct 2010 14:20:51 -0500
1.2 Name/Description: Project1.exe
1.3 Version Number :
1.4 Parameters :
1.5 Compilation Date: Wed, 20 Oct 2010 14:20:50 -0500
1.6 Up Time : 0 second
Exception:
-----------------------------------------------------
2.1 Date : Wed, 20 Oct 2010 14:20:51 -0500
2.2 Address : 0073178E
2.3 Module Name : Project1.exe
2.4 Module Version:
2.5 Type : EOraError
2.6 Message : ?????????????????????.
2.7 ID : 748A
2.8 Count : 1
2.9 Status : New
2.10 Note :
User:
-------------------------------------------------------
3.1 ID : John Dorlon
3.2 Name : John Dorlon
3.3 Email :
3.4 Company : Quest Software
3.5 Privileges: SeChangeNotifyPrivilege - ON
SeSecurityPrivilege - OFF
SeBackupPrivilege - OFF
SeRestorePrivilege - OFF
SeSystemtimePrivilege - OFF
SeShutdownPrivilege - OFF
SeRemoteShutdownPrivilege - OFF
SeTakeOwnershipPrivilege - OFF
SeDebugPrivilege - ON
SeSystemEnvironmentPrivilege - OFF
SeSystemProfilePrivilege - OFF
SeProfileSingleProcessPrivilege - OFF
SeIncreaseBasePriorityPrivilege - OFF
SeLoadDriverPrivilege - ON
SeCreatePagefilePrivilege - OFF
SeIncreaseQuotaPrivilege - OFF
SeUndockPrivilege - ON
SeManageVolumePrivilege - OFF
SeImpersonatePrivilege - ON
SeCreateGlobalPrivilege - ON
Active Controls:
----------------------------
4.1 Form Class : TForm1
4.2 Form Text : Form1
4.3 Control Class: TDBGrid
4.4 Control Text :
Computer:
----------------------------------------------------------------------------------------
5.1 Name : REM7VNC5M1
5.2 Total Memory : 3326 Mb
5.3 Free Memory : 1279 Mb
5.4 Total Disk : 78.13 Gb
5.5 Free Disk : 70.1 Gb
5.6 System Up Time: 6 hours, 21 minutes, 24 seconds
5.7 Processor : Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
5.8 Display Mode : 1920 x 1200, 32 bit
5.9 Display DPI : 96
5.10 Video Card : ATI Radeon HD 3470 - Dell Optiplex (driver 8.593.0.0 - RAM 512 MB)
5.11 Printer : Canon i560 (driver 1.71.2.11)
Operating System:
------------------------------------
6.1 Type : Microsoft Windows XP
6.2 Build # : 2600
6.3 Update : Service Pack 3
6.4 Language: English
6.5 Charset : 0
Call Stack Information:
----------------------------------------------------------------------------------------
|Address |Module |Unit |Class |Procedure/Method |Line |
----------------------------------------------------------------------------------------
|*Exception Thread: ID=3012; Priority=0; Class=; [Main] |
|--------------------------------------------------------------------------------------|
|0073178E|Project1.exe|OraCall.pas | |OraError |4931[6] |
|00731720|Project1.exe|OraCall.pas | |OraError |4925[0] |
|00731BDA|Project1.exe|OraCall.pas | |Check |5011[2] |
|00731BBC|Project1.exe|OraCall.pas | |Check |5009[0] |
|00731BB0|Project1.exe|OraCall.pas | |Check |5005[1] |
|00731B98|Project1.exe|OraCall.pas | |Check |5004[0] |
|0077B438|Project1.exe|OraClasses.pas|TOraNumber |GetAsString |15458[17]|
|0077B304|Project1.exe|OraClasses.pas|TOraNumber |GetAsString |15441[0] |
|00797BCA|Project1.exe|Ora.pas |TOraNumberField|GetAsString |5792[2] |
|77F2EE75|GDI32.dll | | |GetCurrentPositionEx | |
|7E4277F2|USER32.dll | | |PostThreadMessageW | |
|7E429160|USER32.dll | | |GetParent | |
|7E42B3FC|USER32.dll | | |CallNextHookEx | |
|7C9010E0|ntdll.dll | | |RtlLeaveCriticalSection| |
|7E4294DD|USER32.dll | | |GetPropW | |
|7E4294B3|USER32.dll | | |GetPropW | |
|7E418A0B|USER32.dll | | |DispatchMessageW | |
|7E418A01|USER32.dll | | |DispatchMessageW | |
|007BBA01|Project1.exe|Project1.dpr | | |14[4] |
----------------------------------------------------------------------------------------
Assembler Information:
---------------------------------------------------------------------
; OraCall.OraError (Line=4931 - Offset=6)
; ---------------------------------------
00731775 push eax
00731776 push $00
00731778 mov eax, [ebp-$04]
0073177B cdq
0073177C xor eax, edx
0073177E sub eax, edx
00731780 mov ecx, eax
00731782 mov dl, $01
00731784 mov eax, dword ptr [OraError.OraError]
00731789 call OraError.EOraError.Create
0073178E call System._RaiseExcept ; <-- EXCEPTION
;
; Line=4932 - Offset=7
; --------------------
00731793 xor eax, eax
00731795 pop edx
00731796 pop ecx
00731797 pop ecx
00731798 mov fs:[eax], edx
0073179B push $007317B8 ; '[‹å]Ã