Search found 193 matches

by btrewern
13.09.2007, 22:35
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Serious TZTable problem with (possible) soullution
Replies: 4
Views: 1581

If you just want to insert into a table use a TZQuery with a

Code: Select all

select * from newsy WHERE 1 = 0;
as your SQL. You don't even download one record and it works with any server.

Regards,

Ben
by btrewern
13.09.2007, 18:05
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Serious TZTable problem with (possible) soullution
Replies: 4
Views: 1581

Cezar, Other possible solution: don't use TZTable. :wink: I've always been told not to use TTable or similar components when using RDBMSs for just this very reason. It may be that some TDataset descendants use a cursor or similar to page through the data returned from the server, but Zeos has never ...
by btrewern
12.09.2007, 10:14
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Firebird + 6.6.1 + Default Values for new record
Replies: 3
Views: 1128

For the field in question set
Required := False;
that should do the trick.

Regards,

Ben
by btrewern
11.09.2007, 13:36
Forum: MySQL
Topic: Problem with last inserted id.
Replies: 18
Views: 5753

Does what work? What are you trying to achieve?

If you keep doing

Code: Select all

SELECT currval('seq_name');
you will keep getting the same answer (as these value are cached per connection). If you keep doing

Code: Select all

SELECT max(id) FROM table_name;
every 1ms you will just cause lots of network traffic.

Regards,

Ben
by btrewern
06.09.2007, 09:57
Forum: MySQL
Topic: Problem with last inserted id.
Replies: 18
Views: 5753

Hudgi, FYI the currval() function is safe for doing things like this and should not cause race conditions. From the PostgreSQL docs: currval Return the value most recently obtained by nextval for this sequence in the current session. (An error is reported if nextval has never been called for this se...
by btrewern
05.09.2007, 15:26
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: escape string
Replies: 8
Views: 4729

Mark,

In PostgreSQL there is the PQescapeStringConn function which I think does what you are looking for from a PostgreSQL point of view.

See here:
http://www.postgresql.org/docs/8.2/stat ... APE-STRING

Introduced in PostgreSQL 7.3.

Regards,

Ben
by btrewern
05.09.2007, 14:32
Forum: MySQL
Topic: Problem with last inserted id.
Replies: 18
Views: 5753

Which is the oldest version of PostgreSQL that Zeos supports?

Schemas came in at 7.3 so you may need to make the query version dependent.

Ben
by btrewern
05.09.2007, 13:56
Forum: MySQL
Topic: Problem with last inserted id.
Replies: 18
Views: 5753

I can't seem to find anywhere that decisively marks a field as a serial field (similar to AUTO_INCREMENT in MySQL speak). But you can use something like SELECT column_default FROM information_schema.columns WHERE table_schema = 'schema' AND table_name = 'table_name' AND column_name = 'column_name' T...
by btrewern
04.09.2007, 17:14
Forum: MySQL
Topic: Problem with last inserted id.
Replies: 18
Views: 5753

You can use the LAST_INSERT_ID() SQL function in MySQL.

Regards,

Ben
by btrewern
13.08.2007, 15:33
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: syntax error at or near ":"
Replies: 2
Views: 906

Try

Code: Select all

SELECT lanname,   regproc(lanpltrusted,lanplcallfoid) AS lanplcallf  FROM pg_language WHERE lanispl ORDER BY lanname;
Regards,

Ben
by btrewern
13.07.2007, 09:17
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Batch insert/update
Replies: 5
Views: 3204

If you are using a (very) new version of PostgreSQL (not sure if it's 8.1 or 8.2 but) you can use the multiple rows version of INSERT. example from the Postgresql docs: INSERT INTO products (product_no, name, price) VALUES (1, 'Cheese', 9.99), (2, 'Bread', 1.99), (3, 'Milk', 2.99); This should be fa...
by btrewern
05.07.2007, 08:59
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Error connecting to postgres 8.1
Replies: 3
Views: 1094

You'll need the following dlls in your path:

comerr32.dll
iconv.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-2.dll
libpq.dll
ssleay32.dll

You can find these in your pgAdmin III program folder.

Regards,

Ben
by btrewern
29.06.2007, 12:02
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: [Urgent] Upgrading to MySQL 5
Replies: 1
Views: 590

The RequestLive property was replaced by ReadOnly. Just ignore the error.

Regards,

Ben
by btrewern
27.06.2007, 09:22
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Application NOT CLOSE - Delphi 7 + Zeos 6.6.1 + Mysql 5
Replies: 2
Views: 825

I seem to remember this has something to do with Zeos being run against the wrong dll. Try to make sure that the dlls supplied along with Zeos in the lib\mysql folder are used ie put them in the application or system32 folder.

Regards,

Ben
by btrewern
19.06.2007, 14:39
Forum: 6.5.1 (alpha) - 6.6.x (beta)
Topic: Zeos append/post and re-ordering
Replies: 2
Views: 714

Does this work if you do the ordering in the dataset?

Try setting to SortedFields to the field you want to order by.

Hope this helps.

Regards,

Ben