Re: Idea of SQL integration
- From: "Ralf Mimoun" <nospam@xxxxxxxxx>
- Date: Sat, 15 Jul 2006 21:34:03 +0200
Frenk wrote:
After almost full-time DB programming, I was thinking about how to
integrate RDBMS & Delphi. I am wondering why isn't possible to solve
this issues like compiler directive e.g. ASM. We all know that there
is no general solution for multiple DB vendors (sas for multiple
CPU-s too). Isn't just a great idea like this:
I don't know. It will be problematic to adopt it to alle the db systems flying around.
I use a very simple approach. My central datamodule has a function called NewQuery. It gets a SQL statement and another parameter (optional): Open, Execute, ExecuteAndFree. The function creates the query object (mostly a TDBISAMQueryExt), sets session, database etc, adds the SQL command and does what the parameter say. Easy enough to use for me, it's everywhere in my application. And yes, that's a place where I use with:
with MainDataModule.NewQuery('SELECT COUNT(*) AS RecCount FROM Customers', nqOpen) do begin
try
Result := FieldByName('RecCount').AsInteger;
finally
Free;
end;
end;
Ralf
.
- Follow-Ups:
- Re: Idea of SQL integration
- From: William Egge
- Re: Idea of SQL integration
- References:
- Idea of SQL integration
- From: Frenk
- Idea of SQL integration
- Prev by Date: Re: String Processing and Collections - improvements needed innative VCL
- Next by Date: Re: Tried Out Delphi 2006
- Previous by thread: Re: Idea of SQL integration
- Next by thread: Re: Idea of SQL integration
- Index(es):
Relevant Pages
|