[Lazarus] TMSSQLConnection how to specify the server port?

Bo Berglund bo.berglund at gmail.com
Thu Dec 28 00:17:33 CET 2017


On Wed, 27 Dec 2017 20:52:00 +0100, Ondrej Pokorny via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>Strange, I connect to MSSQL without InitialiseDBLib in both 64bit and 
>32bit applications. I only add dblib.dll and libiconv.dll to the exe.
>
You are right. I commented out the initialization line and it still
works.
So I must have changed things in a different order, but I don't know
how it happened.
In any case I don't get exceptions anymore, but I have not verified
data retrieval either. I just ran a stored procedure via FQuery.Open
of an EXEC string.

As a side thing, I was not aware that Lazarus was building 64 bit
applications as default. That is why the 32 bit dll:s would not work I
assume.

How do I set the project for a Win32 target?
I found one place in the project options (Compiler/Config and Target),
but when I change it from "Default" to Win32 there is a warning saying
this:
"The current FPC has no config file. It will probably miss
some units. Check your installation of fpc."

But I have done nothing else than installing from the Lazarus 1.8
installer (lazarus-1.8.0-fpc-3.0.4-win64.exe), which also gets me fpc
3.0.4. So I don't know how to "check my installation".

On Linux I always build from sources and so I know for sure where
.fpc.cnf is located, not so on Windows....


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list