Search found 193 matches

by btrewern
05.12.2008, 15:14
Forum: 6.6 - stable
Topic: Postgresql reception message from database
Replies: 4
Views: 632

LISTEN and NOTIFY are slightly different. I think the OP is talking about RAISE NOTICE and RAISE EXCEPTION which can be used in stored procedures to display messages. See here http://www.postgresql.org/docs/8.3/interactive/plpgsql-errors-and-messages.html I thought there was a patch in the testing v...
by btrewern
24.11.2008, 16:08
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: How to create a Stored Procedure at runtime ?
Replies: 5
Views: 2717

BTW if you want to use ':' in your query which also has parameters then double your ':'s.

Regards,

Ben
by btrewern
21.11.2008, 10:51
Forum: MS SQL Server
Topic: how to connect the ms sql server 2K on ubuntu system?
Replies: 18
Views: 7899

All, I'm pretty sure there is no such thing as ADO on Linux so we can't expect much from the Lazarus team regarding that. The only way I can find to access MS SQL server fron *nix is via http://www.freetds.org/. This includes a standard library and an ODBC driver so it's a start. As I understand it,...
by btrewern
19.10.2008, 18:16
Forum: MySQL
Topic: Data from insert
Replies: 5
Views: 893

You could try using a TZSequence component. It's used for situations like this.

Ben
by btrewern
17.10.2008, 21:36
Forum: 6.6 - stable
Topic: TZConnection concurrency questions
Replies: 1
Views: 502

You need to use multiple TZConnections for concurrent queries. I've done it in a similar application to the one you describe and it works very well.

Ben
by btrewern
16.10.2008, 09:20
Forum: 6.6 - stable
Topic: ZUpdateSQL and default datetime field value
Replies: 12
Views: 1792

You could use a trigger as follows: CREATE TRIGGER APP_MODULES_DEFAULT FOR APP_MODULES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.LASTUPDATE IS NULL) OR (NEW.LASTUPDATE = 0)) THEN BEGIN NEW.LASTUPDATED = "Now"; END END to replace your DEFAULT clause. I've had to do this when using o...
by btrewern
06.10.2008, 12:24
Forum: PostgreSQL
Topic: Warning during console application
Replies: 13
Views: 1933

It looks like it's libpq.dll working as designed. See here: http://www.postgresql.org/docs/8.3/static/libpq-notice-processing.html . Note where is says "The default notice handling function prints the message on stderr, ...." It also looks like the only way to stop this is to set the PQnot...
by btrewern
31.08.2008, 16:53
Forum: 6.6 - stable
Topic: How to Handle AutoIncs (or SERIALS in Postgres)
Replies: 3
Views: 792

See the ZSequence component. It's made specifically for this.

Regards,

Ben
by btrewern
08.08.2008, 09:30
Forum: SQLite Administrator
Topic: Anyway to shrink the file size?
Replies: 2
Views: 930

I'm not sure how SQLite Administrator manages it but see http://www.sqlite.org/lang_vacuum.html for the standard SQLite command.

Regards,

Ben
by btrewern
11.07.2008, 16:52
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: ZQuery Insert/Update problem with MSSQL
Replies: 12
Views: 3176

Try using the TZSQLMonitor to see what queries are being sent to the server.

Ben
by btrewern
05.07.2008, 21:03
Forum: SQLite
Topic: Strange problem with edit of table
Replies: 2
Views: 870

If I had to guess I'd say your table doesn't have a primary key. Try adding one to see if that fixes this.

Ben
by btrewern
04.07.2008, 09:25
Forum: MySQL
Topic: Time conversion > 24 hours returns zero
Replies: 2
Views: 760

Jona, It looks like Delphi's TTimeField is being used to represent your result. TTimeFields are limited to the range 00:00:00 .. 23:59:59.999.... and it looks like when Zeos is passed a value outside this range it returns 00:00:00 (See AnsiSQLDateToDateTime in the ZSysUtils unit). You could try usin...
by btrewern
30.06.2008, 12:02
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Referencing other tables
Replies: 5
Views: 1122

Which DB are you using?

I don't expect you will be able to do this whatever database you are using. Try using a view instead.

In delphi you would do this using a calculated field and doing the calculation in the OnCalcFields event handler.

Regards,

Ben
by btrewern
20.03.2008, 16:07
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Filtering issue
Replies: 3
Views: 1166

With a quick web search I've found the original code by Kevin Boylan which Sergey Seroukhov used as the base for the ZMatchPattern Unit. See attached file.

I've used this to replace the code in ZMatchPattern and the filtering seems to work correctly.

Anyone have any comments?

Ben
by btrewern
20.03.2008, 14:42
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Filtering issue
Replies: 3
Views: 1166

After some investigation it looks like this is a problem in the ZMatchPattern.pas unit. See function MatchAfterStar(Pattern, Text: string): Integer; var P, T, PLen, TLen: Integer; begin Result := 0; P := 1; T := 1; PLen := Length(Pattern); TLen := Length(Text); if TLen = 1 then begin Result := MATCH...