[fpc-pascal]plugin frameworks.

A.J. Venter ddt at vukanet.co.za
Fri Jul 19 22:06:46 CEST 2002

Ok all this considdered then I though I should share my typecase code with you and ask for help correcting it.

program mysql_example;

Function S2P (Str: AnsiString) : Pchar;

	S2P := StrAlloc (length(Str)+1);
	S2P := StrPCopy (S2P,Str);

{Then when I want to do a mysql_query with web data I  would do something like:
mysql_query(sock,s2p('SELECT * FROM table WHERE name="'+Data[1].value'));

Which consistently fail whenever the total lenth of Str exceeds 255 characters (everything after 255 gets thrown away);

The explicit declaration of Str as type AnsiString was added later (when trying to debug) I get the same results using just string with {$H+} declared.

Any help would be greatly appreciated.

A.J. Venter

On Friday 19 July 2002 10:49, Olaf Leidinger wrote:
> Hi
> If you're looking for a portable way have a look at the glib unit from gtk
> - either 1.0 or 2.0. The original C-Reference is found here:
> http://developer.gnome.org/doc/API/2.0/glib/glib-dynamic-loading-of-modules
>. html
> Ciao,
> Olaf
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list