Article View: borland.public.cppbuilder.database.ado
Article #1008TADODataSet and CodeGuard error
From: Aleix Ventayol
Date: Tue, 30 Nov 2004 18:30
Date: Tue, 30 Nov 2004 18:30
43 lines
2174 bytes
2174 bytes
I'm using C++Builder 6, when I try to create a TADODataSet object, Codeguard
says:
"Method called on illegally casted object"
You can check it using the code:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
TADODataSet * ds=new TADODataSet (this);
}
The codeguard output is:
Error 00086. 0x130C10 (Thread 0x074C):
Method called on illegally casted object: Attempt to access 608 byte(s) at
0x0115649C. The 'this' pointer points to heap block 0x0115649C which is
only
604 bytes long.
Call Tree:
0x00401FE0(=Project1.exe:0x01:000FE0)
e:\borland6\cbuilder6\include\vcl\ADODB.hpp#965
0x00401F60(=Project1.exe:0x01:000F60) D:\ProvesAleix\aaaa\Unit1.cpp#20
0x400EDDA7(=vcl60.bpl:0x01:03CDA7)
0x400EDA93(=vcl60.bpl:0x01:03CA93)
0x400F59A4(=vcl60.bpl:0x01:0449A4)
0x004018AD(=Project1.exe:0x01:0008AD) D:\ProvesAleix\aaaa\Project1.cpp#13
The memory block (0x0115649C) [size: 604 bytes] was allocated with SysGetMem
Call Tree:
0x40002FCF(=rtl60.bpl:0x01:001FCF)
0x00401F60(=Project1.exe:0x01:000F60) D:\ProvesAleix\aaaa\Unit1.cpp#20
0x400EDDA7(=vcl60.bpl:0x01:03CDA7)
0x400EDA93(=vcl60.bpl:0x01:03CA93)
0x400F59A4(=vcl60.bpl:0x01:0449A4)
0x004018AD(=Project1.exe:0x01:0008AD) D:\ProvesAleix\aaaa\Project1.cpp#13
Any advice?
Thanks,
Aleix
Technical Details
Message-ID:
<41acbca3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,26d0f13f1d685e71,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Aleix Ventayol" <aleix@metalcam.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: TADODataSet and CodeGuard error Date: Tue, 30 Nov 2004 19:30:06 +0100 Lines: 45 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 83.175.205.202 Message-ID: <41acbca3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1101839523 83.175.205.202 (30 Nov 2004 10:32:03 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail