[fpc-pascal]FCL-Sample required, please!
Rainer Hantsch
rainer at hantsch.co.at
Tue Oct 31 10:46:24 CET 2000
Thanks a lot!
This IS, what I was searching for since months. A SAMPLE. ;-)
Ing. Rainer Hantsch
\\|// Ing. Rainer HANTSCH - Hardware + Software
(o o) Your Partner - Your Supplier - Your Friend!
--oOOo-(_)-oOOo--------------------------------------------------
Ing. Rainer HANTSCH | e-Mail: office at hantsch.co.at
Khunngasse 21/20 | www : http://www.hantsch.co.at
A-1030 Vienna | Tel. : ++43 - 1 - 7988538 0
---------------------| Fax : ++43 - 1 - 7988538 18
** AUSTRIA ** | Mobile: ++43 - 663 - 9194382
-----------------------------------------------------------------
On Tue, 31 Oct 2000, Michael Van Canneyt wrote:
: On Tue, 31 Oct 2000, Rainer Hantsch wrote:
:
: > Hello, everybody!
: >
: > Since a lot of time I am trying to write FPC programs which use MySQL in
: > the background.
: >
: > Well, there exists a sample from Michael V.C., which shows a very basic
: > way of accessing MySQL. It works, but very complicated.
:
: Complicated ?! The most basic example !?
You mis-understood. this sample is not _complicated_, there is only
relatively much programming required to access the data. The below sample
appears much simpler.
: I've made it even more basic:
: ------------------------------------------------------------------------
: program mtest;
:
: uses db,sysutils,mysqldb;
:
: Var
: Data : TMysqldataset;
: I,Count : longint;
:
:
: begin
: if paramcount<>4 then
: begin
: Writeln ('Usage : mtest db user pwd sql');
: Halt(1);
: end;
: Data:=TMysqlDataset.Create(Nil);
: With Data do
: begin
: Database:=Paramstr(1);
: User:=Paramstr(2);
: PassWord := Paramstr(3);
: SQL.text := Paramstr(4);
: Open;
: While NOT EOF do
: begin
: With Fields do
: For I:=0 to FieldCount-1 do
: Writeln(Fields[i].FieldName:20,': ',Fields[i].AsString);
: Next;
: end;
: Free;
: end;
: end.
: -------------------------------------------------------------------------
: More simple than this is not possible.
:
: > Since a while I hear and read that FCL shall support MySQL. However, I
: > have never seen a sample program compareaable to the good old
: > "testdb", but written in FCL, nor any documentation on FCL anyway.
:
: Documentation on FCL is being written. It's a lot of work.
I also think so. It is a huge library!
More information about the fpc-pascal
mailing list