* * *

Author Topic: property IsUniDirectional (problems with) No member is provided to access proper  (Read 2499 times)

lazguy

  • New member
  • *
  • Posts: 35
I saw in Delphi´s Guide that using the property IsUniDirectional can improve the query´s speed. So I tried to use that. But I´m having problems. When I build the program in Lazarus it causes the following error:

ERROR: No member is provided to access property

Here is the code:

Code: [Select]
    Con:=TZConnection.Create(nil);
    Con.Protocol:='sqlite-3';
    Con.Database:=extractfilepath(paramstr(0))+'control.s3db';
    Con.Connect;
    zqry:=TZQuery.Create(nil);
    zqry.Connection:=Con;
    zqry.IsUniDirectional := true;

( ... rest of code )


Code: [Select]
    conAjustAux:=TSQLite3Connection.Create(nil);
    conAjustAux.DatabaseName:=TempFile1;
    tranAjustAux:=TSQLTransaction.Create(nil);
    tranAjustAux.DataBase:=conAjustAux;
    qryAjustAux:=TSQLQuery.Create(nil);
    conAjustAux.Open;
    qryAjustAux.Transaction:=tranAjustAux;
    qryAjustAux.DataBase:=conAjustAux;
    qryAjustAux.IsUniDirectional:=true;

(... rest of code )

Can someone help me?

Thank you in advance.

webcss

  • New member
  • *
  • Posts: 6
Seems to be a bug. Which version (Lazarus/ fpc) do you use?

lazguy

  • New member
  • *
  • Posts: 35
Thank you, webcss.

I am using Lazarus 0.9.28.2
FPC 2.2.4
SQLDBlaz 1.0.1
Zeos DBO 6.6.6

The database is SQLite 3

I will run on Windows and Linux.

Who can help me ?

Thank you very much in advance.

Lacak2

  • Sr. Member
  • ****
  • Posts: 331
In case of sqlDB there is in db.pas in TDataSet defined property IsUniDirectional as:

property IsUniDirectional: Boolean read FIsUniDirectional default False;

You can see, that there is no write method, so you can not set IsUniDirectional property.
May, be that this is bug, becasue there is unused protected method SetUniDirectional.
It can be easy fixed:

property IsUniDirectional: Boolean read FIsUniDirectional write SetUniDirectional default False;

IMHO you can report it as bug in bug tracker ...

lazguy

  • New member
  • *
  • Posts: 35
Thank you Lacak2.

Maybe, if the protected method SetUniDirectional is unused, it is not 100% ready. So, if I use it, maybe it will not do what I expect it to do. Don´t you think it is so much curious that both (Zeos and SQLDB) causes the same error message? So maybe the problem is with FPC and not only with SQLDB. In my opinion if the problem is only with SQLDB, Zeos should work, but this is not true.
Maybe the method SetUniDirectional was intentionally deactivated due to problems in FPC.

Who can help me?

Thank you very much in advance.

Lacak2

  • Sr. Member
  • ****
  • Posts: 331
Don´t you think it is so much curious that both (Zeos and SQLDB) causes the same error message?
Yes it is interesant ;-)

So maybe the problem is with FPC and not only with SQLDB. In my opinion if the problem is only with SQLDB, Zeos should work, but this is not true.
Maybe the method SetUniDirectional was intentionally deactivated due to problems in FPC.
I do not think, that problem is in FPC


Who can help me?
In case of sqlDB you can post bug-report ... and wait how it will be solved
In case of Zeos you can ask in Zeos forums ...

lazguy

  • New member
  • *
  • Posts: 35
I have disappeared. I´m sorry, but i was busy.

Thank you, Lacak2.

I will make more researches.

If someone have the answer, please don´t be shy and help me.


Have a nice day!!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads