[fpc-pascal]longint -> Pchar
baron kractor
baron.kractor at cogeco.ca
Wed Dec 10 22:51:00 CET 2003
On a hunch I grabbed an older version of the win32 mysqld "non installer"
(zip file) and started using *that* version of libmysql.dll
Everything seems to be working ok now ... sorry for the previous post,
hopefully I haven't annoyed anyone too much.
-----Original Message-----
From: fpc-pascal-admin at lists.freepascal.org
[mailto:fpc-pascal-admin at lists.freepascal.org] On Behalf Of baron kractor
Sent: December 10, 2003 4:29 PM
To: fpc-pascal at lists.freepascal.org
Subject: RE: [fpc-pascal]longint -> Pchar
Got that particular issue fixed. Now I'm having some issues w/ really
strange query results being returned. Even with the example code that came
w/ the version of fpc that I'm using, I get the following results from a
query that should return 0 or nil ...
Number of records returned : 8589934592
Number of fields per record : 0
Talked to some people, and it was suggested that perhaps the version of
libmysql.dll I'm using doesn't match the version of mysql that the program
is accessing. The machine that's hosting the mysqld is running openbsd 3.4,
and the output of "mysql --version" results in the following ...
mysql Ver 11.18 Distrib 3.23.57, for unknown-openbsd3.4 (i386)
Anyone else had this problem before?
-----Original Message-----
From: fpc-pascal-admin at lists.freepascal.org
[mailto:fpc-pascal-admin at lists.freepascal.org] On Behalf Of Marco van de
Voort
Sent: December 10, 2003 5:43 AM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal]longint -> Pchar
> Is there a (hopefully easy) way to convert a longint variable to either
> Pchar / string / ansistring without changing the contents of the variable?
> For example, longint variable containing "12345" converted to one of the
> string types would still print as "12345". Closest I've been able to get
so
> far results in the converted variable being printed as some strange
> characters ...
You always need a conversion. Either str() (in system) or sysutils.inttostr.
The memory layout of a string and longint is not the same.
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
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