Search found 20 matches

by MarkusD
15.06.2007, 11:40
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Goto and Find functions?
Replies: 4
Views: 1692

Locate

If you look at the code you will see that GoToCurrent and FindKey both use Locate. Only FindNearest wouldn't work with it, so i copied the code from Locate and ( hopefully) made the appropriate changes.

Best Regards,

Markus Dütting
cosymed AG
by MarkusD
14.06.2007, 09:58
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Goto and Find functions?
Replies: 4
Views: 1692

FindKey, FindNearest, GotoCurent

Dind't have time to test these functions, but perhaps it helps. function TZTable.FindKey(var KeyValues: array of TVarRec): Boolean; var V: Variant; i: integer; FieldRefs: TObjectDynArray; FieldDirs: TBooleanDynArray; OnlyDataFields: Boolean; KeyFields: String; begin DefineSortedFields( Self, IndexFi...
by MarkusD
28.01.2006, 20:37
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Too much memory usage
Replies: 6
Views: 1903

Hello Alfonso, perhaps MySQL can't determine the column size on the if statement and therefore reports a very large one. What column type is Beschreibung with and without if? Perhaps you can use a typecast ( e.g. varchar(255))? Sorry if i'm wrong, i don't have any experience with MySQL but imho it s...
by MarkusD
14.01.2006, 14:25
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Alternative for RecordCount ?
Replies: 4
Views: 1264

Check BOF and EOF

Hello gto, Just checking if BOF and EOF aren't both true, is imo the best way to check if a query didn't return a row. Query1.SQL.Text := 'select 1 from tablename where columnname = comparevalue'; Query1.Open; if not ( Query1.BOF and Query1.EOF) then ShowMessage( 'Record found'); Query1.Close; You c...
by MarkusD
09.01.2006, 10:50
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Questions to get Zeos to work on FPC/Lazarus again
Replies: 3
Views: 1004

Hello Loesje,

you can safely delete these units from the dbc directory. I already contacted Michael about this. I would personally delete them but i don't have write access to cvs.

Best Regards,
Markus
by MarkusD
07.01.2006, 01:18
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Speed of update
Replies: 4
Views: 1162

Hi pol, doesn't look like that to me. But i must admit that i'm quite new to Zeos. I thought it will be cached if a row is read and all rows are read e.g. if you call RecordCount, use Filter ( MasterFields) and as i've just seen Locate ( it calls RecordCount) regardless of Table or Query. To DialAfc...
by MarkusD
05.01.2006, 18:13
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Speed of update
Replies: 4
Views: 1162

Hello DialAfc, the way ZeosLib implements Locate is fetching record after record from the db until a match is found. Integer comparison is a lot faster than AnsiStrLComp which is used to compare the strings. So the behaviour you described is expected. A definitely faster way should be using an updat...
by MarkusD
04.01.2006, 18:23
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: TZConnection, ADO and TService
Replies: 3
Views: 1158

Hello marco, as your error message already states you don't have all necessary rights to access some registry key(s). Services run normally under the System account and don't have full access to HKLM and no HKCU. Imho you have two options: 1. Try to find out what registry keys are the problem ( e.g....
by MarkusD
03.01.2006, 18:58
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: LookupKeyFields
Replies: 6
Views: 1913

Hello DarkBrain, i thought you were using the Lookup or Locate method of a TDataSet. There you can use multiple fields seperated with semicolons. You want to use a fkLookup field with multiple references? The easiest way you can achive this imho would be using a calculated field ( FieldKind fkClalcu...
by MarkusD
31.12.2005, 00:22
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Cannot install in Delphi5
Replies: 7
Views: 2165

Hello ErikL, perhaps you can post your changes and i can see what i can do. ( Don't have D5 on my machine at the moment, but the cd should be there anywhere and integrating them in cvs would also help i think). Did you check that you tried to install the recompiled version of ZComponents.bpl not som...
by MarkusD
31.12.2005, 00:13
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: LookupKeyFields
Replies: 6
Views: 1913

Hi DarkBrain,

it should work as you described, but a little bit more information would be useful:

What DB?
What Version of DB?

I suppose you are using ZeosLib 6.5.1?

What is your failing line of code?

Best Regards,
Markus Dütting
by MarkusD
30.12.2005, 12:17
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: ZeosLIB and Sybase ASE 12
Replies: 4
Views: 1726

Hello Viktor, please don't use a personal message as long as others could benefit from your ( or mine) reply. That's the reason for a forum isn't it? Did you try to set the connection options language and codepage in Properties of ZConnection? Language= codepage= I don't know the values you can use ...
by MarkusD
29.12.2005, 10:43
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: ZeosLIB and Sybase ASE 12
Replies: 4
Views: 1726

Hello Viktor, I must admit that i don't have any knowledge of Sybase ASE. ASA or SQL Anywhere Studio is a completely different product besides the similarities in the name. It also uses a different connection type in Zeos ( TDS based DBLib used in Sybase ASE and MS SQL versus Embedded SQL DBLib used...
by MarkusD
06.09.2005, 11:38
Forum: User Patches
Topic: Database Rebuild for Firebird 1.5
Replies: 11
Views: 5433

Cursor?

Can you create a cursor on this statement? declare y number; begin for y in 1..10 loop select count(*) into :x from dual; end loop; end; If not then it can't work in ZEOS. How would you access the different values of x otherwise? If you can then your example is something like a select statement. Tha...
by MarkusD
05.09.2005, 16:29
Forum: User Patches
Topic: Database Rebuild for Firebird 1.5
Replies: 11
Views: 5433

Re: Parsing Parameters and commands

begin select count(*) into :x from dual; end; Shouldn't this example be parsed as one statement? Sybase ASA calls this a compound statement and begin ... end is used to group statements together as one statement. But if that's correct Oracle syntax i understand the problems. Sybase ASA uses curly b...