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 ...
Mailing lists / fpc-pascal / 2003-12
longint -> Pchar
4 messages · 3 people ·
- Bbaron kractor 2
- DDarren Reynolds 1
- MMarco van de Voort 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Show quoted text 6 lines
You always need a conversion. Either str() (in system) or sysutils.inttostr.
The memory layout of a string and longint is not the same.
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?
Earlier message 20 lines
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.
