Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Databases / Re: Database standards OR Am I doing this right?
« Last post by paweld on Today at 01:07:33 pm »
I use an additional column for this purpose. Example structure:
Code: SQL  [Select][+][-]
  1. CREATE TABLE testtab (
  2.   id NUMERIC IDENTITY(1,1),
  3.     name VARCHAR(50) NOT NULL,
  4.     qty DECIMAL(14,4) NOT NULL,
  5.     price DECIMAL(12,2) NOT NULL,
  6.     description VARCHAR(200) NULL,
  7.     blocked INT NULL, /*is null then if is null then the record is not blocked (not edited) by any user. If it is edited then the field contains the id of the user who is blocking this record*/
  8.     CONSTRAINT pk_testtab PRIMARY KEY clustered (id ASC)
  9. )
2
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by paweld on Today at 12:58:14 pm »
Add the Interfaces unit to uses section
3
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by 440bx on Today at 12:42:21 pm »
@440bx, okay since you are not stopping to blame my code, you have my full working testcode, make it crash boom bang, can you?
If you managed to make it crash, show what you modified that it can crash.
You're missing the whole point.  That definition of WriteFile is wrong and, as I stated in a previous post, the fact that it can be made to work does _not_ change that.  It is still wrong.

I and, just about anyone, can make that incorrect definition work too, as a matter of fact, I have throw away code (that I haven't thrown away yet) that uses it.   (guess how I noticed the definition is wrong)

What neither you nor anyone can do, is code a call to WriteFile that complies with MS' spec (the author of the function) using the Pascal definition and make it work.  No one can.  The reason: because the Pascal definition is _wrong_.

Lastly, it isn't about your code, it is about the Pascal definition being wrong/incorect.  That's what it's about.

Programming seems to be the premier activity where errors are worshiped and perpetuated.  We "cannot correct that" (whatever "that" may be) because it would break a lot of wrong code we have and we don't want to correct the code (too much work), if we did, we'd have to test again and we'd run the risk of missing a side effect brought about by the correction.  Can't have that.  Instead, we'll claim it's not wrong, just not "equivalent".

However, in spite of the definition because wrong/incorrect, all those who pretend it is not, are _absolutely right_.

I'm going to call that "binary diplomacy". 
4
General / Access violation when opening Tools/Options
« Last post by Чебурашка on Today at 12:27:34 pm »
Hello,
I noticed that with the lazarus shipped by debian 12 (lazarus 2.2.6) when I do Tools/Options I get an Access Violation, that seems related to the parsing of the jedi code formatter settings.

Once I encountered this issue, I tried to download from https://www.lazarus-ide.org/ the debian packages available there, in this case I tried with lazarus 3.2.2, but seems I get the same error.

Does anybody have the same problem?
5
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by paule32 on Today at 12:14:25 pm »
UPDATE  ;D

since the DLL work, I found a very nice tool called objcopy.
With this tool, you can re-define the symbols of an .o bject file.

On my test's, this shrinks my FPC_RTL.DLL from 11.000 Bytes to 9.000 Bytes.
The TEST1.EXE is in size by 6.500 Bytes.

I saved 2.000 Bytes on the DLL.
When I run upx.exe over the EXE, I end up with a 4.096 Byte sized EXE binary image.

So, I end up with this on with  16.500 Bytes (6.400 Bytes zipped file) for the DLL + EXE.
Or: 13.000 Bytes in total (with upx.exe).

Please, don't bite me - the file size values there are rounded, because I am to lazy to calculate the differnt differences  :D
6
Databases / Re: Database standards OR Am I doing this right?
« Last post by egsuh on Today at 12:02:06 pm »
Quote
@egsuh: Generally, it should be the case that a record should have a semaphore set to inform other users that it is being edited.
But without information about the specific case, it is difficult to say anything.

@paweld:

Thank you very much for kind advice. I'm not a full-time programmer and do not know much about these basic facts^^. Just from logical reasoning. Are the semaphores done somehow by the DB server or should users prepare them?
7
Databases / Re: Step-into the field setter
« Last post by Martin_fr on Today at 11:31:48 am »
It works.
Other problem, however, it fails step into with a standard tfield (i.e., that of the standard LCL "fields.inc"). I have compiled Lazarus in Debug IDE but it does not work F7 and breakpoint. Should I do something else?

You mean TField in unit "DB" in folder fcl-db? => That is part of fpc. You need to rebuild fpc, using the make files. Or using fpcupdeluxe.
8
Thanks!,
I was trying to keep down the posting size, but I have attached the entire demonstration project below.

The call stack shows that the failure occurs in IBCONNECTION but it might be good to know that the problem doesn't happen with other databases.

This is indeed a tiny fraction of a fairly complex program that uses parameterised queries in many places (It's a monitoring system for semiconductors undergoing environmental testing). Changing databases would be a huge problem! We need to be able to change the parameters to queries, and the official way to do this is to close the query, change parameters, and re-open as in the attached example. This worked fine with our previous (out of date) copy of Lazarus. Is there an archive of old versions somewhere? I couldn't find it on the site. Then we could go back to the old version (not the best solution) if we really have to.

I can't believe that I'm the first person to find this problem.
9
Hello Joao Paulo,

I am very happy that you continue to develop CAI!!

B->
10
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by jollytall on Today at 11:01:45 am »
The error messages are as said above. I made a screenshot of the first errors:

What I also tried is another project that compiles just OK (and does not use any networking, indy or other). Then I add in the Project Inspector the freshly downloaded indylaz to the Required Packages (no unit mentioned explicitly) and I get the 73 error pairs like the ones on the screenshot and obviously a 74th error "Error while linking". If I remove it as a required package then my project (the one without networking) compiles again.
In my networking project, I cannot remove the required package because then the units are not found.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018