Article View: borland.public.cppbuilder.database.ado
Article #1437Re: must take address of a memory location
From: frankzyz
Date: Thu, 22 Jul 2004 13:33
Date: Thu, 22 Jul 2004 13:33
91 lines
3969 bytes
3969 bytes
ADOQtmp->Close();
ADOQtmp->SQL->Clear();
ADOQtmp->SQL->Add("select * from t1 ") ;
ADOQtmp->Open();
ADOQtmp->Append();
ADOQtmp->FieldByName("f1")->AsInteger=4;//breakpoint
ADOQtmp->FieldByName("f2")->AsInteger=4;
ADOQtmp->Post();
when I point the mouse to the breakpoint, the popup message told me:
ADOQtmp->FieldByName("f1")->AsInteger = E2122 function call terminated by
unhandled exception 0fxeedfade at address ....
so i think it is because some kind of hide bug.
thanks for help.
Frank
"frankzyz" <frankzyz@etang.com> д���ʼ�
news:40ffb689@newsgroups.borland.com...
> I noticed that help document, and found it nouse.
> And I cant continue without overcoming the problem that popup message
> pointed out.
> If I add
> Q1->FieldByName("f1")->AsInteger=somevalue;
> to souce code, it will crash at this line. I think it is because that Q1
is
> not initiated properly. But I do set it as normal and as books' examples.
>
> Thank you for your reply.
>
> Frank
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> д���ʼ�
> news:40ffb43a@newsgroups.borland.com...
> > When you move cursor and something popups, IDE tries to compile code for
> > internal purposes (for parsing). E2027 is explained in help as:
> >
> > Your source file used the address-of operator (&) with an expression
that
> > can't be used that way; for example, a register variable.
> >
> > Just continue to do what you need and do not look at this popup.
> >
> > //------------------------------------------
> > Regards,
> > Vassiliev V. V.
> > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> > ADO.Net
> > http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> > MS Jet (Access) and Interbase (through OLEDB)
> >
> > "frankzyz" <frankzyz@etang.com> ������?�������� ?�������� ��������?
> > news:40ff9b5d@newsgroups.borland.com...
> > > 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:
<40ffc242@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40ff9b5d@newsgroups.borland.com> <40ffb43a@newsgroups.borland.com> <40ffb689@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,c2e3f8fc4771854c X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII From: "frankzyz" <frankzyz@etang.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40ff9b5d@newsgroups.borland.com> <40ffb43a@newsgroups.borland.com> <40ffb689@newsgroups.borland.com> Subject: Re: must take address of a memory location Date: Thu, 22 Jul 2004 21:33:48 +0800 Lines: 93 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: <40ffc242@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090503234 220.248.133.64 (22 Jul 2004 06:33:54 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail