Article View: borland.public.cppbuilder.database.ado
Article #1433must take address of a memory location
From: frankzyz
Date: Thu, 22 Jul 2004 10:47
Date: Thu, 22 Jul 2004 10:47
25 lines
1715 bytes
1715 bytes
hi,
I run into a problem that related to bcb6 and adoquery,access datebase.
I create a form with ide, then put an adoconnection component and an
adoquery , a Button onto it.
Then I set the properties of adoconnection to fit the access database, ie.,
db1.
After that I set the properties of adoquery to fit the adoconnection and add
SQL String as simple as "select max(f1) as maxn from t1".
Then add some code to the button:
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Q1->Close(); //add breakpoint here
Q1->SQL->Clear();
Q1->SQL->Add("select * from t1");
}
The problem is:
when the program ran to the breakpoint,I point the mouse to Q1->Close();
it popup a message : "Q1->Close()=E2027 Must take address of a memory
location"
I dont know how to solve the problem and why it arrised.
Thanks in advance !
Frank
Technical Details
Message-ID:
<40ff9b5d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.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,c2e3f8fc4771854c,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "frankzyz" <frankzyz@etang.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: must take address of a memory location Date: Thu, 22 Jul 2004 18:47:51 +0800 Lines: 28 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: 220.248.133.64 Message-ID: <40ff9b5d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090493277 220.248.133.64 (22 Jul 2004 03:47:57 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.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