🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Larry D. Tue, 12 Dec 2000 00:15
CodeGard Error
#5987
Author: Larry D.
Date: Tue, 12 Dec 2000 00:15
24 lines
1641 bytes
When I open a ADOConnection CodeGuard reports a error.  The code is somewhat
as follows.

  DBConn = new TADOConnection (Application);
  DBConn->ConnectionString = ConnStr;
  DBConn->Open ();

   When the code to open the ADOConnection CodeGuard reports this error:

  "Method called on illegally casted object"
        Attempt to access 216 byte(s) at 0x015c6c10. The 'this' pointer
points to heap block 0x015c6c10 which is only 212 bytes long.


   This appears the ADOConnection object is larger by 4 bytes than what is
actually allocated by the system.  Is there some inconsistency with the
header and the object files for ADO.

    I have installed the most recent patches from Code Cental that is dated
'10/13/2000'

    Any help in this is most appreciated.

   Larry;
Re: CodeGard Error
#5997
Author: Stefan Schuster-Teupke
Date: Thu, 14 Dec 2000 09:29
43 lines
2066 bytes
Hi,

I faced exactly the same problem yesterday:

It's a question of data alignment. By default CBuilder uses QUADWORD,
and what you need here is BYTE. At least then CodeGuard stops complaining.
You will find it in Project / Options / Advanced compiler / data alignment.

Regards

Stefan

"Larry D." <LCalkins@rmci.net> schrieb im Newsbeitrag
news:3a356cec_1@dnews...
> When I open a ADOConnection CodeGuard reports a error.  The code is
somewhat
> as follows.
>
>   DBConn = new TADOConnection (Application);
>   DBConn->ConnectionString = ConnStr;
>   DBConn->Open ();
>
>    When the code to open the ADOConnection CodeGuard reports this error:
>
>   "Method called on illegally casted object"
>         Attempt to access 216 byte(s) at 0x015c6c10. The 'this' pointer
> points to heap block 0x015c6c10 which is only 212 bytes long.
>
>
>    This appears the ADOConnection object is larger by 4 bytes than what is
> actually allocated by the system.  Is there some inconsistency with the
> header and the object files for ADO.
>
>     I have installed the most recent patches from Code Cental that is
dated
> '10/13/2000'
>
>     Any help in this is most appreciated.
>
>    Larry;
>
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads