SourceForge has been redesigned. Learn more.

Direct SQL - Delphi / News: Recent posts

1.2.2. version

Added support for multiple statements (needed for stored procedures)

Posted by Cristian Nicola 2005-11-25

Threaded connect/query

Every now and then somebody asks for how to connect (or execute a query) and have the form still working. In order to answer to this question i've created a little helper unit ..
For the source code have a look at:

uThreadedDM.pas in read more

Posted by Cristian Nicola 2005-08-15

Full support for 4.1x - direct mysql 1.2.1

Please note that this version is under strict GPL - any previous permission to use direct mysql in your non-gpl projects does NOT apply to this release, and direct mysql 1.2.1 should ONLY be used as GPL.

Posted by Cristian Nicola 2005-02-28

Sending/receiving blobs from mysql

Every so often someone would ask how to upload an image to mysql or how to download a song from mysql. I had decided to create a simple helper package that should make this things easyer, and 4 tiny functions have been created ...
For a demo have a look at:

Kind regards,
Cristian Nicola

Posted by Cristian Nicola 2004-11-30

Version 1.1.4

The new minor version is finally out ... Altough not many changes compared to the previous one, it is higly recommended to upgrade it.
The new version has now an infinite timeout, returns default value for fields when describing a table, and makes a distinction between empty and NULL strings. On top of this thread safety can now be enabled, such as more than one thread can use the same client to access the server.
It fixes an overflow error accidentally introduced in the previous version(s).... read more

Posted by Cristian Nicola 2004-04-05

Mysql 4.1.x password protocol

The new Mysql 4.1.x secure password protocol is now available for testing. If you are interested in using it please do send me an e-mail request.

Cristian Nicola

Posted by Cristian Nicola 2003-12-13

Minor bug fix - enhancement

02/03/2003 - before strdispose(pac) in line 689 there should be a:
if pac<>packet1 then

In the unit uMysqlNet in the implementation of
function TMysqlNet.net_real_write there is a possible memory leak. The fix is:
lines 638 and 639
pac:=stralloc(len1); //get some memory ???
should be replaced by:

Line 667
len1:=len1+ header_length;
should be removed as:
len1:=len1+ header_length;
pac:=b;... read more

Posted by Cristian Nicola 2003-02-21

Patching Zeos DBO 5.4 final

The patch from download section would be compatible with the latest zeos version and it require the following change:
override the function MySqlToDelphiTypeDesc in ZDirMySql.pas (from the patch) with the one from the 5.4 implementation.

Cristian Nicola

Posted by Cristian Nicola 2002-11-26

Minor bug fix - error on sending large queries

What happends is on slow network it does not get a chance to flush the tcp/ip stack and it will give an error - which will be considered as a server lost error. This is a result of not using the blocking mode when writing to the socket.
there are 3 fixes:
1) increase RETRY_COUNT in uMysqlCT
2) wherever you find in uMysqlNet "< RETRY_COUNT" replace it with "<= RETRY_COUNT"
3)the "real" fix is in unit uMysqlNet:
in net_real_write you will find this line 679:
if (fvio.vio_should_retry) then //should retry?... read more

Posted by Cristian Nicola 2002-08-28

New ZEOS patch

The new zeos patch enables you to switch between libmysql.dll and direct-mysql objects with just a single compiler directive.
There is also a sample patch on how to add ssl support to zeos (curently untested).


Posted by Cristian Nicola 2002-07-17

Important bug fix

I've just discovered an interesting bug ...
When running a query eg: "select afield from atable" and you get a recordset like: "one","","two","three" you will see only the first row.
The fix is in read_rows function while
which should be:
while not (( byte(cp[0]) = 254) and (pkt_len = 1)) do
instead of
while ( byte(cp[0]) <> 254) and (pkt_len <> 1) do... read more

Posted by Cristian Nicola 2002-03-25

New minor version on the way

A new week a new month a new minor version.
The fixes include:
- unix sockets (named pipes on linux) were left out of the initialization code
- error handling is better/faster
- new connect timedout works on both connect and read .. so no more stalled application when reading a large dataset and you lose connection to server. The connect is very fast now, especially when typing in wrong host information :) ( if you set a timeout of 10 seconds it will take no longer than 10 seconds - compared to previous version where it took 10 seconds + about 10 more).
I will upload it tomorrow so stick around for it,
Cristian Nicola

Posted by Cristian Nicola 2002-03-24

Threading? Poll reading?

I've noticed that the application is frozen when you execute a large query .. anyone would be interested to have a threaded version?


Posted by Cristian Nicola 2002-03-08

Zeos patch

As you all got used .. there will be a patch for Zeos in order to use a TDataset descendant and direct-mysql objects. Currently the patch it is being tested and will be released later on today or tomorrow.
Cristian Nicola

Posted by Cristian Nicola 2002-01-30

New mailing list

There has been created a new mailing list for mysql and delphi matters (not only this direct mysql stuff). Everyone is wellcomed to subscribe.

Cristian Nicola

Posted by Cristian Nicola 2002-01-30

FreePascal - Virtual Pascal

I'm currently working on compression for the objects for both this compilers, so there will be a release pretty soon. If anyone is anxious to get it sooner drop me an email and i will send you the sources in current stage.
ps: if anyone knows .. array typecasting in vp (eg var anint:integer;
type anarr:array of byte;
anarr(anint)[0] <- if anyone knows how to sort this out) please do let me know asap.
2) if you know the object files format for free pascal ... i would love to know if $L directive works.

Posted by Cristian Nicola 2002-01-23

SSL now supported

Altough it does not return complete errors code and details about them is working ..
So .. happy mysql-ing!

Posted by Cristian Nicola 2002-01-09

Direct Mysql - Objects

Hi all!
Finally i had finished the objects for direct working with mysql.
I will upload a full demo and the code somewhere during next few days.
Cristian Nicola

Posted by Cristian Nicola 2002-01-06