|
사용환경은 BCB 6.0 Ent SP4, 윈도우 XP Pro, DB는 오라클 9i 입니다...
코드가드 에러와 소스를 아래에 올립니다.... 아래 소스말고는 아무것도 없는데, 왜 그런지 모르겠네요..
******** 코드가드 메시지
Error 00001. 0x130C10 (Thread 0x04BC):
Method called on illegally casted object: Attempt to access 224 byte(s) at
0x011A6678. The 'this' pointer points to heap block 0x011A6678 which is only
220 bytes long.
Call Tree:
0x00401F96(=JRTestDB.exe:0x01:000F96) d:\compiler\borland\c++builder\include\vcl\ADODB.hpp#277
0x00401F0B(=JRTestDB.exe:0x01:000F0B) E:\프로젝트\네트워크\Bitmage\JRTestDB\Form_Main.cpp#29
0x0046FAC3(=JRTestDB.exe:0x01:06EAC3)
0x0047ED6F(=JRTestDB.exe:0x01:07DD6F)
0x00481C00(=JRTestDB.exe:0x01:080C00)
0x0047EB3F(=JRTestDB.exe:0x01:07DB3F)
The memory block (0x011A6678) [size: 220 bytes] was allocated with SysGetMem
Call Tree:
0x004529CF(=JRTestDB.exe:0x01:0519CF)
0x004388EE(=JRTestDB.exe:0x01:0378EE)
0x00438B3A(=JRTestDB.exe:0x01:037B3A)
0x00438A79(=JRTestDB.exe:0x01:037A79)
0x0043CC0A(=JRTestDB.exe:0x01:03BC0A)
0x0046F5CE(=JRTestDB.exe:0x01:06E5CE)
------------------------------------------
Functions called:
fflush (4 times)
delete (11 times)
free (7 times)
new (11 times)
SysReallocMem (38 times)
SysFreeMem (663 times)
SysGetMem (664 times)
lstrlenA (1 times)
lstrcpynA (4 times)
calloc (1 times)
strlen (77 times)
realloc (1 times)
strdup (1 times)
malloc (4 times)
memcpy (2 times)
Resource types used:
object (11 allocs, 11 max)
memory block (671 allocs, 359 max)
Modules used:
003D0000 06/16/2003 01:00:00 D:\Compiler\Borland\C#Builder\Bin\borlndmm.dll
00400000 11/03/2004 23:26:16 E:\Execute\네트워크\BMServer\JRTestDB.exe
01360000 10/10/2003 11:57:12 C:\WINDOWS\System32\tabhook.dll
0CD00000 02/01/2002 23:00:00 D:\Compiler\Borland\C__BUI~1\Bin\CG32.DLL
10000000 01/04/2004 02:08:14 D:\Util\ADSPider\ad-spider.dll
20000000 08/04/2004 00:52:34 C:\WINDOWS\system32\xpsp2res.dll
3AF30000 07/14/2003 22:57:38 C:\WINDOWS\system32\IMEKR70.IME
4EDE0000 08/04/2004 00:53:18 C:\Program Files\Common
Files\System\ADO\msado15.dll
5C820000 08/04/2004 00:53:12 C:\WINDOWS\system32\COMCTL32.DLL
61300000 08/30/2001 04:00:00 C:\WINDOWS\system32\MFC42LOC.DLL
62340000 08/04/2004 00:53:18 C:\WINDOWS\system32\LPK.DLL
73D10000 08/04/2004 00:53:18 C:\WINDOWS\system32\MFC42.DLL
73F80000 08/04/2004 00:53:30 C:\WINDOWS\system32\USP10.dll
74660000 08/04/2004 00:53:20 C:\WINDOWS\system32\MSCTF.dll
75110000 08/04/2004 00:51:38 C:\WINDOWS\system32\msctfime.ime
75B30000 08/04/2004 00:53:20 C:\WINDOWS\system32\MSDART.DLL
762E0000 08/04/2004 00:53:18 C:\WINDOWS\system32\IMM32.DLL
76300000 08/04/2004 00:53:12 C:\WINDOWS\system32\comdlg32.dll
76970000 08/04/2004 00:53:24 C:\WINDOWS\system32\OLE32.DLL
76F80000 08/04/2004 00:53:12 C:\WINDOWS\system32\CLBCATQ.DLL
77000000 08/04/2004 00:53:12 C:\WINDOWS\system32\COMRes.dll
770D0000 08/04/2004 00:53:24 C:\WINDOWS\system32\OLEAUT32.DLL
77160000 08/04/2004 00:50:54
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.
2600.2180_x-ww_a84f1ff9\comctl32.dll
77380000 08/04/2004 00:53:26 C:\WINDOWS\system32\SHELL32.dll
77BB0000 08/04/2004 00:53:30 C:\WINDOWS\system32\VERSION.dll
77BC0000 08/04/2004 00:53:22 C:\WINDOWS\system32\msvcrt.dll
77CF0000 08/04/2004 00:53:30 C:\WINDOWS\system32\USER32.DLL
77D80000 08/04/2004 00:53:26 C:\WINDOWS\system32\RPCRT4.dll
77E20000 08/04/2004 00:53:16 C:\WINDOWS\system32\GDI32.dll
77E70000 08/04/2004 00:53:26 C:\WINDOWS\system32\SHLWAPI.dll
77F50000 08/04/2004 00:53:12 C:\WINDOWS\system32\ADVAPI32.DLL
7C800000 08/04/2004 00:53:18 C:\WINDOWS\system32\kernel32.dll
7C930000 08/04/2004 00:53:06 C:\WINDOWS\system32\ntdll.dll
==========================================
*********** 소스
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 시작
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
void __fastcall TWin_Main::FormShow(TObject *Sender)
{
Left = Screen->WorkAreaWidth - Width;
Top = Screen->WorkAreaHeight - Height;
ADO_Connect->Mode = cmReadWrite;
ADO_Connect->ConnectionString = // 이 부분은 비공개 사항이므로 뺐습니다...
ADO_Query->Connection = ADO_Connect;
ADO_Query->Prepared = true;
ADO_Connect->Open(); // 여기서 에러납니다. 코드가드 메세지에서 Form_Main.cpp#29 부분임...
Edit_Query->SetFocus();
}
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 종료
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
void __fastcall TWin_Main::FormClose(TObject *Sender, TCloseAction &Action)
{
ADO_Connect->Close();
}
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// 쿼리문 전송
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
void __fastcall TWin_Main::Btn_OkClick(TObject *Sender)
{
ADO_Query->Close();
ADO_Query->SQL->Clear();
ADO_Query->SQL->Add(Edit_Query->Text);
if(Edit_Query->Text.UpperCase().Pos("SELECT") > 0)
{
ADO_Query->Open();
Label_Return->Caption = ADO_Query->RecordCount;
}
else
{
ADO_Query->ExecSQL();
Label_Return->Caption = "없음";
}
}
|