[Lazarus] Accessing MS SQLServer database from Lazarus/FPC?

Bo Berglund bo.berglund at gmail.com
Mon Jan 24 07:43:28 CET 2011


On Sun, 23 Jan 2011 20:32:09 -0500, waldo kitty
<wkitty42 at windstream.net> wrote:

>On 1/23/2011 14:15, Bo Berglund wrote:
>> After making a search on my complete disk I found the file sqldb.pp in
>> the FPC2.4.2 folder tree.
>> That is, it was not found in the lazarus tree at all, is this OK?
>>
>> After adding the new lines from the patch I want to test it, but I
>> don't know how I can make lazarus use the new file....
>> Just compiling my example again seems not to work.
>>
>> What can I do to make it "take"? Do I need to compile FPC (since the
>> file is part of the FPC sources) or do I rebuild the lazarus itself?
>> Or maybe both?
>>
>> I have actually no clue in this respect. I always worked in Delphi
>> before and there the compiler checked the files and recompiled if
>> needed, but with lazarus it seems like you have to do this manually...
>
>FWIW: i'm pretty sure you have already gotten an answer to this but i just 
>wanted to take a moment to point out that this type of patch would be like a 
>direct patch to delphi, which you are used to working with, and using the 
>existing delphi to compile a new delphi... now, of course, you have not been 
>able to do this with delphi but you can with FPC and Lazarus... in the delphi 
>world, you have had to wait on the delphi folks to release a new delphi 
>version... this is one of the advantages of FPC and/or FPC/Lazarus over the 
>delphi and other similar commercial packages' worlds ;)

Well, the comparison is a bit off in that here all that was done is to
change 3 lines of code in the sqldb.pp file.
It is more like a modification of a VCL source file in Delphi, which
we have done several times.

All we need to do in Delphi is to modify the source file and command a
build of *our application* for this change to be effected. The IDE or
the compiler is never involved in this at any stage.

Another possibility in Delphi is to subclass the VCL component into a
new one, but that has not been suggested here. We have done that with
the TListView for instance, to get better usability. It involves
making our own component class where we inherit from TListView and add
our own minor stuff, then install this new component into the IDE
(without recompiling the IDE itself).

The problem I see here is that whatever small change you want to make
in something not related to the IDE at all you are forced to rebuild
lazarus itself. And in this particular case rebuilding Lazarus does
not even help, it seems like one has to rebuild FPC itself. Very
strange to me.

And btw I have NOT gotten a working solution to the problem of testing
the change in sqldb.pp....


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list