🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2452

ADO error detected by codeguard

#2452
From: Georg Neidisch
Date: Fri, 20 Jun 2003 09:59
56 lines
2704 bytes
H�, I use one TADOConnection and since a long ago
it works very fine.
I just decided to enable the CodeGuard and it says 
that something happended.

Here my code:

05  if (ADOCon->Connected)
06    ADOCon->Close();
07
08  StringCon = "Provider=" + Provider
09            + ";Password=" + Password
10            + ";User ID=" + UserID
11            + ";Data Source=" + DataSource
12  ADOCon->ConnectionString = WideString(StringCon);
13  ADOCon->LoginPrompt = false;
14
15 try {
16   ADOCon->Open();
17 } catch (EDBEngineError &e1) {
18   Message = "DB Engine Error:\n" + e1.Message;
19   Application->MessageBox(Message.c_str(), "Error", MB_OK);
20 } catch (EDatabaseError &e2) {
21   Message = "Database Error:\n" + e2.Message;
22   Application->MessageBox(Message.c_str(), "Error", MB_OK);
23 }
24

And Codeguard says:

Error 00123. 0x130C10 (Thread 0x0097):
Method called on illegally casted object: Attempt to access 224 byte(s) at
 0x016269D8. The 'this' pointer points to heap block 0x016269D8 which is only
 220 bytes long.
Call Tree:
   0x0041F506(=Project1.exe:0x01:01E506) c:\programme\borland\cbuilder6\include\vcl\ADODB.hpp#277
   0x0041EAF8(=Project1.exe:0x01:01DAF8) C:\proj\DMConn.cpp#26
   0x40037B52(=rtl60.bpl:0x01:036B52)
   0x400379FF(=rtl60.bpl:0x01:0369FF)
   0x400F59A4(=vcl60.bpl:0x01:0449A4)
   0x00401BCA(=Project1.exe:0x01:000BCA) C:\proj\Project1.cpp#32

The memory block (0x016269D8) [size: 220 bytes] was allocated with SysGetMem
Call Tree:
   0x40002FCF(=rtl60.bpl:0x01:001FCF)
   0x4002F73A(=rtl60.bpl:0x01:02E73A)
   0x4002F986(=rtl60.bpl:0x01:02E986)
   0x4002F8C5(=rtl60.bpl:0x01:02E8C5)
   0x40036992(=rtl60.bpl:0x01:035992)
   0x4002D917(=rtl60.bpl:0x01:02C917)


Can anybody help me???

GN
Technical Details
Message-ID: <3ef2daee$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,47a532e85a864738,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-06-20 03:10:22 PST
From: "Georg Neidisch" <pacheco@newsaktuell.de>
Sender: "Georg Neidisch" <pacheco@newsaktuell.de>
Reply-To: "Georg Neidisch" <pacheco@newsaktuell.de>
Subject: ADO error detected by codeguard
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 193.201.168.164 193.201.168.164    
X-Forwarded-For: unknown
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3ef2daee$1@newsgroups.borland.com>
Date: 20 Jun 2003 02:59:10 -0700
X-Trace: newsgroups.borland.com 1056103150 207.105.83.65 (20 Jun 2003 02:59:10 -0700)
Lines: 56
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail