On Tue, 17 Oct 2006, Mattias Gaertner wrote:
> On Tue, 17 Oct 2006 15:19:21 +0200 (CEST)
> Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Tue, 17 Oct 2006, Mattias Gaertner wrote:
> >
> > > On Fri, 13 Oct 2006 09:17:07 +0200
> > > Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > >
> > > > On Fri, 13 Oct 2006 07:51:54 +0700
> > > > Diwakoe <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Dear all,
> > > > >
> > > > > I get error when using auto complete on lazarus (ctrl+space)
> > > > > with TMySQL50Connection component in form. All component is
> > > > > working properly (can connect to mysql 5 server on design mode)
> > > > > but error occur when I add one button and want to add code into
> > > > > onclick button like this:
> > > > >
> > > > > unit1.pas(17,13) Error: identifier not found:
> > > > > TMySQL50Connection
> > > >
> > > > Can you post a small example?
> > >
> > > Thanks.
> > >
> > > fpc uses macros to define TMySQL50Connection
> > > in fpc/fcl/db/sqldb/mysql/mysqlconn.inc
> > >
> > > The IDE does not support macros.
> > >
> > > Add the following 3 lines in front of the TForm1 class
> > >
> > > type
> > > TMySQL50Connection = mysql50conn.TConnectionName;
> > > TMySQL50Transaction = mysql50conn.TTransactionName;
> > > TMySQL50Cursor = mysql50conn.TCursorName;
> > >
> > > I don't understand, why the fpc unit contains macros instead of
> > > those lines above.
> >
> > Check the code again :-)
> >
> > Because the purpose of this include file is to define TConnectionName.
> > It does exactly the opposite of what you do.
> >
> > The include file is included by the 3 units mysql50conn mysql41conn
> > mysql40conn and through the macros defines the
> > TMySQL{50/40/41}Connection classes...
>
> I still need a hint to understand, why you can not remove the IFDEF
> block at the start of the include file and add an IFDEF block below
> without macros.
And what would you put in this ifdef block ?
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives