Ok, Bram, for your explanation.

By the way, I write the data using the following code in the event "after post":
begin
 SQLQuery1.ApplyUpdates;
SQLTransaction1.Commit; //In this moment, after commit, the query is closed !!!? SQLQuery1.active:=true; //So, I have open it !!!? This does to return for the first record !!! How to keep the current register?
end;

Is correct the code? The problem is that the query is closed. So I have that to open again and the pointer goes for the first record. I used the bookmark, but, not work. How to keep the pointer on the current register? Do you know?

Thanks.

----- Original Message ----- From: "Bram Kuijvenhoven" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, December 05, 2005 9:29 AM
Subject: Re: [lazarus] Re: About PSQL (Sqldb package) Components


Prof. Paulo Amaral wrote:
The problem is that these examples use "select" for ends of exhibition and navigation of data in forms with dbedits, dbnavigator, etc. The "update" or "insert" use with DbAware controls does not have example showing. When you edit and write a register using dbnavigator, datasource, it is written in the ram memory (in cache). However, for example, in the Delphi, using TClienteDataset, you write (commit) with "applyupdates" in the event "afterpost", so that cache is recorded in database. Using Sqldb components (TPQConnection, TSQLQuery, TSQLTransaction) I can't make this. However, I saw in web forum the following example:

"begin
 { The SQLQuery in Lazarus does work with parameters yet, so }
 { we build the SQL statement completely.                      }

Parameter support is available in at least some of the sqldb components. I implemented it in odbcconn, and it was already implemented in IB and PQ iirc.

The SQL parser that scans for parameter markers in the query which I built for odbcconn was moved to TParams.ParseSQL by Joost (see e.g. http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/fcl/db/dsparams.inc?rev=1656&view=log). It supports :ParamName and ? type parameters. Database components should use TParams.ParseSQL, so the parsing is kept centralised.

Note: ODBCConn currently lacks support for BLOBs, hence string fields are limited (i.e. truncated) to db.dsMaxStringSize = 8192; Note2: currently the latter can cause a crash when a varchar field contains more than 8192 characters; a patch will be available soon.

Regards,

Bram

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 2/12/2005



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to